diff options
author | Mark Rutland <mark.rutland@arm.com> | 2016-09-07 12:07:09 +0200 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2016-09-12 11:46:07 +0200 |
commit | 6ba3b554f5b9b53cb99c0edb93f0ea855fbc712a (patch) | |
tree | e9dc583beb65d3deb66fa72184afe4ed8550f9af /arch/arm64/kernel/entry.S | |
parent | arm64: alternative: add auto-nop infrastructure (diff) | |
download | linux-6ba3b554f5b9b53cb99c0edb93f0ea855fbc712a.tar.xz linux-6ba3b554f5b9b53cb99c0edb93f0ea855fbc712a.zip |
arm64: use alternative auto-nop
Make use of the new alternative_if and alternative_else_nop_endif and
get rid of our homebew NOP sleds, making the code simpler to read.
Note that for cpu_do_switch_mm the ret has been moved out of the
alternative sequence, and in the default case there will be three
additional NOPs executed.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/kernel/entry.S')
-rw-r--r-- | arch/arm64/kernel/entry.S | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index 6880dcc3b465..223d54a4d66b 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -150,13 +150,7 @@ ldr x23, [sp, #S_SP] // load return stack pointer msr sp_el0, x23 #ifdef CONFIG_ARM64_ERRATUM_845719 -alternative_if_not ARM64_WORKAROUND_845719 - nop - nop -#ifdef CONFIG_PID_IN_CONTEXTIDR - nop -#endif -alternative_else +alternative_if ARM64_WORKAROUND_845719 tbz x22, #4, 1f #ifdef CONFIG_PID_IN_CONTEXTIDR mrs x29, contextidr_el1 @@ -165,7 +159,7 @@ alternative_else msr contextidr_el1, xzr #endif 1: -alternative_endif +alternative_else_nop_endif #endif .endif msr elr_el1, x21 // set up the return data |