mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
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>
This commit is contained in:
committed by
Catalin Marinas
parent
580b536b50
commit
9be34be87c
@@ -790,6 +790,16 @@ alternative_endif
|
||||
.Lnoyield_\@:
|
||||
.endm
|
||||
|
||||
/*
|
||||
* Branch Target Identifier (BTI)
|
||||
*/
|
||||
.macro bti, targets
|
||||
.equ .L__bti_targets_c, 34
|
||||
.equ .L__bti_targets_j, 36
|
||||
.equ .L__bti_targets_jc,38
|
||||
hint #.L__bti_targets_\targets
|
||||
.endm
|
||||
|
||||
/*
|
||||
* This macro emits a program property note section identifying
|
||||
* architecture features which require special handling, mainly for
|
||||
|
||||
Reference in New Issue
Block a user