From: Mathieu Desnoyers Date: Mon, 5 Dec 2016 17:25:42 +0000 (-0500) Subject: ARM32: use dmb ish (inner shareable domain) for smp barriers X-Git-Tag: v0.10.0~13 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=7fe7e9f353c3596b78b6bed1f4267037de750a48;p=urcu.git ARM32: use dmb ish (inner shareable domain) for smp barriers Based on https://gcc.gnu.org/ml/gcc-patches/2014-11/msg01272.html: From: Ramana Radhakrishnan : "Hans Boehm pointed out that we were using dmb sy instead of dmb ish. Given that the ARM-ARM says that the inner shareability domain is really the one that contains all PE's controlled by a single hypervisor or operating system, it would be safe to replace all dmb sy's with dmb ish's. " Keep full system barriers for cmm_mb()/cmm_rmb()/cmm_wmb(). Signed-off-by: Mathieu Desnoyers --- diff --git a/include/urcu/arch/arm.h b/include/urcu/arch/arm.h index 5cbca7d..cb8f28d 100644 --- a/include/urcu/arch/arm.h +++ b/include/urcu/arch/arm.h @@ -31,9 +31,19 @@ extern "C" { #endif #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") +/* + * Issues full system DMB operation. + */ +#define cmm_mb() __asm__ __volatile__ ("dmb sy":::"memory") +#define cmm_rmb() __asm__ __volatile__ ("dmb sy":::"memory") +#define cmm_wmb() __asm__ __volatile__ ("dmb sy":::"memory") + +/* + * Issues DMB operation only to the inner shareable domain. + */ +#define cmm_smp_mb() __asm__ __volatile__ ("dmb ish":::"memory") +#define cmm_smp_rmb() __asm__ __volatile__ ("dmb ish":::"memory") +#define cmm_smp_wmb() __asm__ __volatile__ ("dmb ish":::"memory") #endif /* CONFIG_RCU_ARM_HAVE_DMB */ #include