aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/mm
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2016-09-07 06:07:09 -0400
committerWill Deacon <will.deacon@arm.com>2016-09-12 05:46:07 -0400
commit6ba3b554f5b9b53cb99c0edb93f0ea855fbc712a (patch)
treee9dc583beb65d3deb66fa72184afe4ed8550f9af /arch/arm64/mm
parent792d47379f4d4c76692f1795f33d38582f8907fa (diff)
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/mm')
-rw-r--r--arch/arm64/mm/proc.S9
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S
index 5eb35964ab8e..1b11dcd7e851 100644
--- a/arch/arm64/mm/proc.S
+++ b/arch/arm64/mm/proc.S
@@ -127,17 +127,12 @@ ENTRY(cpu_do_switch_mm)
127 bfi x0, x1, #48, #16 // set the ASID 127 bfi x0, x1, #48, #16 // set the ASID
128 msr ttbr0_el1, x0 // set TTBR0 128 msr ttbr0_el1, x0 // set TTBR0
129 isb 129 isb
130alternative_if_not ARM64_WORKAROUND_CAVIUM_27456 130alternative_if ARM64_WORKAROUND_CAVIUM_27456
131 ret
132 nop
133 nop
134 nop
135alternative_else
136 ic iallu 131 ic iallu
137 dsb nsh 132 dsb nsh
138 isb 133 isb
134alternative_else_nop_endif
139 ret 135 ret
140alternative_endif
141ENDPROC(cpu_do_switch_mm) 136ENDPROC(cpu_do_switch_mm)
142 137
143 .pushsection ".idmap.text", "ax" 138 .pushsection ".idmap.text", "ax"