aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/assembler.h
diff options
context:
space:
mode:
authorRussell King <[email protected]>2018-05-11 10:15:29 +0000
committerRussell King <[email protected]>2018-05-31 22:27:16 +0000
commita78d156587931a2c3b354534aa772febf6c9e855 (patch)
treee76fd07a3833a1e3a91ad3c86a19a736a39033f4 /arch/arm/include/asm/assembler.h
parentARM: KVM: report support for SMCCC_ARCH_WORKAROUND_1 (diff)
downloadkernel-a78d156587931a2c3b354534aa772febf6c9e855.tar.gz
kernel-a78d156587931a2c3b354534aa772febf6c9e855.zip
ARM: spectre-v1: add speculation barrier (csdb) macros
Add assembly and C macros for the new CSDB instruction. Signed-off-by: Russell King <[email protected]> Acked-by: Mark Rutland <[email protected]> Boot-tested-by: Tony Lindgren <[email protected]> Reviewed-by: Tony Lindgren <[email protected]>
Diffstat (limited to 'arch/arm/include/asm/assembler.h')
-rw-r--r--arch/arm/include/asm/assembler.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h
index bc8d4bbd82e2..ef1386b1af9b 100644
--- a/arch/arm/include/asm/assembler.h
+++ b/arch/arm/include/asm/assembler.h
@@ -447,6 +447,14 @@ THUMB( orr \reg , \reg , #PSR_T_BIT )
.size \name , . - \name
.endm
+ .macro csdb
+#ifdef CONFIG_THUMB2_KERNEL
+ .inst.w 0xf3af8014
+#else
+ .inst 0xe320f014
+#endif
+ .endm
+
.macro check_uaccess, addr:req, size:req, limit:req, tmp:req, bad:req
#ifndef CONFIG_CPU_USE_DOMAINS
adds \tmp, \addr, #\size - 1