diff options
author | Will Deacon <will.deacon@arm.com> | 2013-05-10 13:07:19 -0400 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2013-08-12 07:25:44 -0400 |
commit | 3ea128065ed20d33bd02ff6dab689f88e38000be (patch) | |
tree | c32b9ec35578f84705af2339941f41ecdfd4d4e0 /arch/arm/include/asm/assembler.h | |
parent | 2c813980c6113ac2c407fbed99f53242088c3038 (diff) |
ARM: barrier: allow options to be passed to memory barrier instructions
On ARMv7, the memory barrier instructions take an optional `option'
field which can be used to constrain the effects of a memory barrier
based on shareability and access type.
This patch allows the caller to pass these options if required, and
updates the smp_*() barriers to request inner-shareable barriers,
affecting only stores for the _wmb variant. wmb() is also changed to
use the -st version of dsb.
Reported-by: Albin Tonnerre <albin.tonnerre@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm/include/asm/assembler.h')
-rw-r--r-- | arch/arm/include/asm/assembler.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index a5fef710af32..fcc1b5bf6979 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h | |||
@@ -220,9 +220,9 @@ | |||
220 | #ifdef CONFIG_SMP | 220 | #ifdef CONFIG_SMP |
221 | #if __LINUX_ARM_ARCH__ >= 7 | 221 | #if __LINUX_ARM_ARCH__ >= 7 |
222 | .ifeqs "\mode","arm" | 222 | .ifeqs "\mode","arm" |
223 | ALT_SMP(dmb) | 223 | ALT_SMP(dmb ish) |
224 | .else | 224 | .else |
225 | ALT_SMP(W(dmb)) | 225 | ALT_SMP(W(dmb) ish) |
226 | .endif | 226 | .endif |
227 | #elif __LINUX_ARM_ARCH__ == 6 | 227 | #elif __LINUX_ARM_ARCH__ == 6 |
228 | ALT_SMP(mcr p15, 0, r0, c7, c10, 5) @ dmb | 228 | ALT_SMP(mcr p15, 0, r0, c7, c10, 5) @ dmb |