arm64: use alternative auto-nop
authorMark Rutland <mark.rutland@arm.com>
Wed, 7 Sep 2016 10:07:09 +0000 (11:07 +0100)
committerWill Deacon <will.deacon@arm.com>
Mon, 12 Sep 2016 09:46:07 +0000 (10:46 +0100)
commit6ba3b554f5b9b53cb99c0edb93f0ea855fbc712a
treee9dc583beb65d3deb66fa72184afe4ed8550f9af
parent792d47379f4d4c76692f1795f33d38582f8907fa
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>
arch/arm64/kernel/entry.S
arch/arm64/lib/copy_page.S
arch/arm64/mm/proc.S