[ltt-dev] [URCU PATCH] arm: put CONFIG_RCU_ARM_HAVE_DMB in the global config.h

Jason Wessel jason.wessel at windriver.com
Wed May 4 15:02:07 EDT 2011


Change CONFIG_ARM_HAVE_DMB to CONFIG_RCU_ARM_HAVE_DMB while at the
same time making it seen as a global setting in urch/config.h.

The initial ARM < v7 work missed this setting, which allowed the URCU
to package to build correctly, but exposed the memorry barriers
defines incorrectly for other applications using the URCU headers.

Signed-off-by: Jason Wessel <jason.wessel at windriver.com>
---
 configure.ac     |    4 ++--
 urcu/arch_arm.h  |    4 ++--
 urcu/config.h.in |    5 ++++-
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 3c61abc..b8c151a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,7 +20,7 @@ AH_TEMPLATE([CONFIG_RCU_HAVE_FENCE], [Defined when on a system that has memory f
 AH_TEMPLATE([CONFIG_RCU_HAVE_FUTEX], [Defined when on a system with futex support.])
 AH_TEMPLATE([CONFIG_RCU_COMPAT_ARCH], [Compatibility mode for i386 which lacks
 cmpxchg instruction.])
-AH_TEMPLATE([CONFIG_ARM_HAVE_DMB], [Use the dmb instruction is available for use on ARM.])
+AH_TEMPLATE([CONFIG_RCU_ARM_HAVE_DMB], [Use the dmb instruction is available for use on ARM.])
 
 # Checks for programs.
 AC_PROG_CC
@@ -67,7 +67,7 @@ asm volatile("dmb":::"memory");
 ],
 [
 	AC_MSG_RESULT([yes])
-	AC_DEFINE([CONFIG_ARM_HAVE_DMB], [1])
+	AC_DEFINE([CONFIG_RCU_ARM_HAVE_DMB], [1])
 ]
 ,
 [
diff --git a/urcu/arch_arm.h b/urcu/arch_arm.h
index f97ae1d..92df8e9 100644
--- a/urcu/arch_arm.h
+++ b/urcu/arch_arm.h
@@ -29,11 +29,11 @@
 extern "C" {
 #endif 
 
-#ifdef CONFIG_ARM_HAVE_DMB
+#ifdef CONFIG_RCU_ARM_HAVE_DMB
 #define cmm_mb()	asm volatile("dmb":::"memory")
 #define cmm_rmb()	asm volatile("dmb":::"memory")
 #define cmm_wmb()	asm volatile("dmb":::"memory")
-#endif /* CONFIG_ARM_HAVE_DMB */
+#endif /* CONFIG_RCU_ARM_HAVE_DMB */
 
 #include <stdlib.h>
 #include <sys/time.h>
diff --git a/urcu/config.h.in b/urcu/config.h.in
index 749c3c0..02c7b2e 100644
--- a/urcu/config.h.in
+++ b/urcu/config.h.in
@@ -1,4 +1,4 @@
-/* urcu/config.h.in. Manually generatad for control over the contained defs. */
+/* urcu/config.h.in. Manually generated for control over the contained defs. */
 
 /* Defined when on a system that has memory fence instructions. */
 #undef CONFIG_RCU_HAVE_FENCE
@@ -13,3 +13,6 @@
 
 /* Compatibility mode for i386 which lacks cmpxchg instruction. */
 #undef CONFIG_RCU_COMPAT_ARCH
+
+/* Use the dmb instruction is available for use on ARM. */
+#undef CONFIG_RCU_ARM_HAVE_DMB
-- 
1.7.1





More information about the lttng-dev mailing list