Skip to content

Commit ebfc726

Browse files
mrutland-armwilldeacon
authored andcommitted
arm64: barrier: Restore spec_bar() macro
Upcoming errata workarounds will need to use SB from C code. Restore the spec_bar() macro so that we can use SB. This is effectively a revert of commit: 4f30ba1 ("arm64: barrier: Remove spec_bar() macro") Signed-off-by: Mark Rutland <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: James Morse <[email protected]> Cc: Will Deacon <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent fec50db commit ebfc726

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/arm64/include/asm/barrier.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
*/
4141
#define dgh() asm volatile("hint #6" : : : "memory")
4242

43+
#define spec_bar() asm volatile(ALTERNATIVE("dsb nsh\nisb\n", \
44+
SB_BARRIER_INSN"nop\n", \
45+
ARM64_HAS_SB))
46+
4347
#ifdef CONFIG_ARM64_PSEUDO_NMI
4448
#define pmr_sync() \
4549
do { \

0 commit comments

Comments
 (0)