diff options
author | Mark Brown <broonie@kernel.org> | 2021-12-14 16:27:12 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2021-12-14 19:12:58 +0100 |
commit | 9be34be87cc8d1afe3c3bc2e645b4dee512d9eda (patch) | |
tree | 07006b3125d6a9bcee977cb2367d0b92d2c97819 /arch/arm64/include/asm/linkage.h | |
parent | Merge 'arm64/for-next/fixes' into for-next/bti (diff) | |
download | linux-9be34be87cc8d1afe3c3bc2e645b4dee512d9eda.tar.xz linux-9be34be87cc8d1afe3c3bc2e645b4dee512d9eda.zip |
arm64: Add macro version of the BTI instruction
BTI is only available from v8.5 so we need to encode it using HINT in
generic code and for older toolchains. Add an assembler macro based on
one written by Mark Rutland which lets us use the mnemonic and update
the existing users.
Suggested-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20211214152714.2380849-2-broonie@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/linkage.h')
-rw-r--r-- | arch/arm64/include/asm/linkage.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/arm64/include/asm/linkage.h b/arch/arm64/include/asm/linkage.h index 9906541a6861..c5d0c11d7709 100644 --- a/arch/arm64/include/asm/linkage.h +++ b/arch/arm64/include/asm/linkage.h @@ -6,12 +6,7 @@ #if defined(CONFIG_ARM64_BTI_KERNEL) && defined(__aarch64__) -/* - * Since current versions of gas reject the BTI instruction unless we - * set the architecture version to v8.5 we use the hint instruction - * instead. - */ -#define BTI_C hint 34 ; +#define BTI_C bti c ; /* * When using in-kernel BTI we need to ensure that PCS-conformant assembly |