aboutsummaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/compiler.h
diff options
context:
space:
mode:
authorGravatar Sami Tolvanen <samitolvanen@google.com> 2020-08-27 13:36:08 -0700
committerGravatar Catalin Marinas <catalin.marinas@arm.com> 2020-08-28 11:15:15 +0100
commit1764c3edc66880778604f5053fe2dda7b3ddd2c1 (patch)
treeab91daddfb4512d9c87fdaf77de518769961d795 /arch/arm64/include/asm/compiler.h
parentLinux 5.9-rc2 (diff)
downloadlinux-1764c3edc66880778604f5053fe2dda7b3ddd2c1.tar.gz
linux-1764c3edc66880778604f5053fe2dda7b3ddd2c1.tar.bz2
linux-1764c3edc66880778604f5053fe2dda7b3ddd2c1.zip
arm64: use a common .arch preamble for inline assembly
Commit 7c78f67e9bd9 ("arm64: enable tlbi range instructions") breaks LLVM's integrated assembler, because -Wa,-march is only passed to external assemblers and therefore, the new instructions are not enabled when IAS is used. This change adds a common architecture version preamble, which can be used in inline assembly blocks that contain instructions that require a newer architecture version, and uses it to fix __TLBI_0 and __TLBI_1 with ARM64_TLB_RANGE. Fixes: 7c78f67e9bd9 ("arm64: enable tlbi range instructions") Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Tested-by: Nathan Chancellor <natechancellor@gmail.com> Reviewed-by: Nathan Chancellor <natechancellor@gmail.com> Link: https://github.com/ClangBuiltLinux/linux/issues/1106 Link: https://lore.kernel.org/r/20200827203608.1225689-1-samitolvanen@google.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/compiler.h')
-rw-r--r--arch/arm64/include/asm/compiler.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/compiler.h b/arch/arm64/include/asm/compiler.h
index 51a7ce87cdfe..6fb2e6bcc392 100644
--- a/arch/arm64/include/asm/compiler.h
+++ b/arch/arm64/include/asm/compiler.h
@@ -2,6 +2,12 @@
#ifndef __ASM_COMPILER_H
#define __ASM_COMPILER_H
+#ifdef ARM64_ASM_ARCH
+#define ARM64_ASM_PREAMBLE ".arch " ARM64_ASM_ARCH "\n"
+#else
+#define ARM64_ASM_PREAMBLE
+#endif
+
/*
* The EL0/EL1 pointer bits used by a pointer authentication code.
* This is dependent on TBI0/TBI1 being enabled, or bits 63:56 would also apply.