[rtems commit] arm: Add ARM_MULTILIB_HAS_BARRIER_INSTRUCTIONS
Sebastian Huber
sebh at rtems.org
Mon Jun 2 11:44:43 UTC 2014
Module: rtems
Branch: master
Commit: 7c90670c81b213610a43f55d065f5b86fd6e646b
Changeset: http://git.rtems.org/rtems/commit/?id=7c90670c81b213610a43f55d065f5b86fd6e646b
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Mon Jun 2 13:23:07 2014 +0200
arm: Add ARM_MULTILIB_HAS_BARRIER_INSTRUCTIONS
---
cpukit/score/cpu/arm/rtems/score/arm.h | 1 +
cpukit/score/cpu/arm/rtems/score/cpu.h | 6 ++++++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/cpukit/score/cpu/arm/rtems/score/arm.h b/cpukit/score/cpu/arm/rtems/score/arm.h
index bb78cbe..a105f17 100644
--- a/cpukit/score/cpu/arm/rtems/score/arm.h
+++ b/cpukit/score/cpu/arm/rtems/score/arm.h
@@ -42,6 +42,7 @@ extern "C" {
|| defined(__ARM_ARCH_7M__)
#define ARM_MULTILIB_HAS_WFI
#define ARM_MULTILIB_HAS_LOAD_STORE_EXCLUSIVE
+ #define ARM_MULTILIB_HAS_BARRIER_INSTRUCTIONS
#endif
#if defined(__ARM_ARCH_7A__) \
diff --git a/cpukit/score/cpu/arm/rtems/score/cpu.h b/cpukit/score/cpu/arm/rtems/score/cpu.h
index d53be60..ad070df 100644
--- a/cpukit/score/cpu/arm/rtems/score/cpu.h
+++ b/cpukit/score/cpu/arm/rtems/score/cpu.h
@@ -301,17 +301,23 @@ extern uint32_t arm_cpu_mode;
static inline void _ARM_Data_memory_barrier( void )
{
+#ifdef ARM_MULTILIB_HAS_BARRIER_INSTRUCTIONS
__asm__ volatile ( "dmb" : : : "memory" );
+#endif
}
static inline void _ARM_Data_synchronization_barrier( void )
{
+#ifdef ARM_MULTILIB_HAS_BARRIER_INSTRUCTIONS
__asm__ volatile ( "dsb" : : : "memory" );
+#endif
}
static inline void _ARM_Instruction_synchronization_barrier( void )
{
+#ifdef ARM_MULTILIB_HAS_BARRIER_INSTRUCTIONS
__asm__ volatile ( "isb" : : : "memory" );
+#endif
}
static inline uint32_t arm_interrupt_disable( void )
More information about the vc
mailing list