Skip to content

Commit

Permalink
powerpc/32: Don't save thread.regs on interrupt entry
Browse files Browse the repository at this point in the history
Since commit 06d67d5 ("powerpc: make process.c suitable for both
32-bit and 64-bit"), thread.regs is set on task creation, no need to
set it again and again at each interrupt entry as it never change.

Suggested-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20d52c627303d63e461797df13e6890fc04017d0.1615552867.git.christophe.leroy@csgroup.eu
  • Loading branch information
chleroy authored and mpe committed Mar 29, 2021
1 parent b96bae3 commit db297c3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions arch/powerpc/kernel/entry_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,8 @@ transfer_to_handler:
stw r2,_XER(r11)
mfspr r12,SPRN_SPRG_THREAD
tovirt(r12, r12)
beq 2f /* if from user, fix up THREAD.regs */
beq 2f
addi r2, r12, -THREAD
addi r11,r1,STACK_FRAME_OVERHEAD
stw r11,PT_REGS(r12)
#ifdef CONFIG_PPC_BOOK3S_32
kuep_lock r11, r12
#endif
Expand Down Expand Up @@ -147,7 +145,6 @@ transfer_to_syscall:
/* Calling convention has r9 = orig r0, r10 = regs */
addi r10,r1,STACK_FRAME_OVERHEAD
mr r9,r0
stw r10,THREAD+PT_REGS(r2)
bl system_call_exception

ret_from_syscall:
Expand Down

0 comments on commit db297c3

Please sign in to comment.