summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/sleep.S
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-08-31 12:05:14 +0100
committerWill Deacon <will.deacon@arm.com>2016-09-02 11:47:51 +0100
commit9dcf7914ae238619ae019dcf82a91c817ff8628e (patch)
tree467135c4d1457e1e3cd95dbe338aee8dd06c81a1 /arch/arm64/kernel/sleep.S
parent3c5e9f238bc475b0712419eaebc643c07c73cb94 (diff)
downloadlinux-9dcf7914ae238619ae019dcf82a91c817ff8628e.tar.gz
linux-9dcf7914ae238619ae019dcf82a91c817ff8628e.tar.bz2
linux-9dcf7914ae238619ae019dcf82a91c817ff8628e.zip
arm64: kernel: use x30 for __enable_mmu return address
Using x27 for passing to __enable_mmu what is essentially the return address makes the code look more complicated than it needs to be. So switch to x30/lr, and update the secondary and cpu_resume call sites to simply call __enable_mmu as an ordinary function, with a bl instruction. This requires the callers to be covered by .idmap.text. Reviewed-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/kernel/sleep.S')
-rw-r--r--arch/arm64/kernel/sleep.S8
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/arm64/kernel/sleep.S b/arch/arm64/kernel/sleep.S
index 6adc76bf8f91..0f7e0b2ac64c 100644
--- a/arch/arm64/kernel/sleep.S
+++ b/arch/arm64/kernel/sleep.S
@@ -100,14 +100,10 @@ ENTRY(cpu_resume)
bl el2_setup // if in EL2 drop to EL1 cleanly
bl __cpu_setup
/* enable the MMU early - so we can access sleep_save_stash by va */
- adr_l x27, _resume_switched /* __enable_mmu will branch here */
- b __enable_mmu
-ENDPROC(cpu_resume)
-
-_resume_switched:
+ bl __enable_mmu
ldr x8, =_cpu_resume
br x8
-ENDPROC(_resume_switched)
+ENDPROC(cpu_resume)
.ltorg
.popsection