From: Jason Wessel Date: Wed, 4 May 2011 19:14:14 +0000 (-0400) Subject: arm: put CONFIG_RCU_ARM_HAVE_DMB in the global config.h X-Git-Tag: v0.6.0~48 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e95ee42934238b371441a463d56f73899ce62867;p=userspace-rcu.git arm: put CONFIG_RCU_ARM_HAVE_DMB in the global config.h 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 Signed-off-by: Mathieu Desnoyers --- 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 #include 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