aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/entry_32.S
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2021-03-12 12:50:32 +0000
committerMichael Ellerman <mpe@ellerman.id.au>2021-03-29 13:22:07 +1100
commit0f2793e33db2e2f062968f2ca789b6826972b05b (patch)
tree91e6c1216c63566d06be3ff5822e5dcd7015a576 /arch/powerpc/kernel/entry_32.S
parentpowerpc/32: Refactor booke critical registers saving (diff)
downloadlinux-dev-0f2793e33db2e2f062968f2ca789b6826972b05b.tar.xz
linux-dev-0f2793e33db2e2f062968f2ca789b6826972b05b.zip
powerpc/32: Perform normal function call in exception entry
Now that the MMU is re-enabled before calling the transfer function, we don't need anymore that hack with the address of the handler and the return function sitting just after the 'bl' to the transfer fonction, that function is retrieving via a read relative to 'lr'. Do a regular call to the transfer function, then to the handler, then branch to the return function. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/73c00f3361ca280ef8fd7814c291bd1f5b6e2081.1615552867.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/kernel/entry_32.S')
-rw-r--r--arch/powerpc/kernel/entry_32.S14
1 files changed, 4 insertions, 10 deletions
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
index ad1fd33e1126..fb849ef922fb 100644
--- a/arch/powerpc/kernel/entry_32.S
+++ b/arch/powerpc/kernel/entry_32.S
@@ -104,7 +104,7 @@ transfer_to_handler:
#ifdef CONFIG_PPC_BOOK3S_32
kuep_lock r11, r12
#endif
- b 3f
+ blr
/* if from kernel, check interrupted DOZE/NAP mode */
2:
@@ -118,13 +118,7 @@ transfer_to_handler:
#endif /* CONFIG_PPC_BOOK3S_32 || CONFIG_E500 */
.globl transfer_to_handler_cont
transfer_to_handler_cont:
-3:
- mflr r9
- lwz r11,0(r9) /* virtual address of handler */
- lwz r9,4(r9) /* where to go when done */
- mtctr r11
- mtlr r9
- bctr /* jump to handler */
+ blr
#if defined (CONFIG_PPC_BOOK3S_32) || defined(CONFIG_E500)
4: rlwinm r12,r12,0,~_TLF_NAPPING
@@ -404,8 +398,8 @@ fee_restarts:
stw r10,_TRAP(r11)
addi r3,r1,STACK_FRAME_OVERHEAD
bl transfer_to_handler_full
- .long unrecoverable_exception
- .long ret_from_except
+ bl unrecoverable_exception
+ b ret_from_except
#endif
.globl ret_from_except_full