diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2021-03-12 15:50:36 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-03-29 05:22:08 +0300 |
commit | e72915560b15f58c2ffe08144d9a7163daa18db4 (patch) | |
tree | 1de6b15d58eb972d5aa3ac8e4920eef4ca40d5b1 /arch/powerpc/kernel/head_booke.h | |
parent | db297c3b07af7856fb7c666fbc9792d8e37556be (diff) | |
download | linux-e72915560b15f58c2ffe08144d9a7163daa18db4.tar.xz |
powerpc/32: Set regs parameter in r3 in transfer_to_handler
All exception handlers take regs as first parameter.
Instead of setting r3 just before each call to a handler, set
it in transfer_to_handler.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/f994a379bb895a2cbd518cb82460ad3f3d3ccdf5.1615552867.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/kernel/head_booke.h')
-rw-r--r-- | arch/powerpc/kernel/head_booke.h | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/arch/powerpc/kernel/head_booke.h b/arch/powerpc/kernel/head_booke.h index b31bf9e833c0..009a56d70d76 100644 --- a/arch/powerpc/kernel/head_booke.h +++ b/arch/powerpc/kernel/head_booke.h @@ -294,13 +294,11 @@ label: #define EXCEPTION(n, intno, label, hdlr, xfer) \ START_EXCEPTION(label); \ NORMAL_EXCEPTION_PROLOG(intno); \ - addi r3,r1,STACK_FRAME_OVERHEAD; \ xfer(n, hdlr) #define CRITICAL_EXCEPTION(n, intno, label, hdlr) \ START_EXCEPTION(label); \ CRITICAL_EXCEPTION_PROLOG(intno); \ - addi r3,r1,STACK_FRAME_OVERHEAD; \ SAVE_MMU_REGS; \ SAVE_xSRR(SRR); \ EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \ @@ -311,7 +309,6 @@ label: MCHECK_EXCEPTION_PROLOG; \ mfspr r5,SPRN_ESR; \ stw r5,_ESR(r11); \ - addi r3,r1,STACK_FRAME_OVERHEAD; \ SAVE_xSRR(DSRR); \ SAVE_xSRR(CSRR); \ SAVE_MMU_REGS; \ @@ -398,7 +395,6 @@ label: /* continue normal handling for a debug exception... */ \ 2: mfspr r4,SPRN_DBSR; \ stw r4,_ESR(r11); /* DebugException takes DBSR in _ESR */\ - addi r3,r1,STACK_FRAME_OVERHEAD; \ SAVE_xSRR(CSRR); \ SAVE_MMU_REGS; \ SAVE_xSRR(SRR); \ @@ -455,7 +451,6 @@ label: /* continue normal handling for a critical exception... */ \ 2: mfspr r4,SPRN_DBSR; \ stw r4,_ESR(r11); /* DebugException takes DBSR in _ESR */\ - addi r3,r1,STACK_FRAME_OVERHEAD; \ SAVE_MMU_REGS; \ SAVE_xSRR(SRR); \ EXC_XFER_TEMPLATE(DebugException, 0x2002, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), crit_transfer_to_handler, ret_from_crit_exc) @@ -482,7 +477,6 @@ label: NORMAL_EXCEPTION_PROLOG(ALIGNMENT); \ mfspr r4,SPRN_DEAR; /* Grab the DEAR and save it */ \ stw r4,_DEAR(r11); \ - addi r3,r1,STACK_FRAME_OVERHEAD; \ EXC_XFER_STD(0x0600, alignment_exception) #define PROGRAM_EXCEPTION \ @@ -490,7 +484,6 @@ label: NORMAL_EXCEPTION_PROLOG(PROGRAM); \ mfspr r4,SPRN_ESR; /* Grab the ESR and save it */ \ stw r4,_ESR(r11); \ - addi r3,r1,STACK_FRAME_OVERHEAD; \ EXC_XFER_STD(0x0700, program_check_exception) #define DECREMENTER_EXCEPTION \ @@ -498,7 +491,6 @@ label: NORMAL_EXCEPTION_PROLOG(DECREMENTER); \ lis r0,TSR_DIS@h; /* Setup the DEC interrupt mask */ \ mtspr SPRN_TSR,r0; /* Clear the DEC interrupt */ \ - addi r3,r1,STACK_FRAME_OVERHEAD; \ EXC_XFER_LITE(0x0900, timer_interrupt) #define FP_UNAVAILABLE_EXCEPTION \ @@ -507,8 +499,7 @@ label: beq 1f; \ bl load_up_fpu; /* if from user, just load it up */ \ b fast_exception_return; \ -1: addi r3,r1,STACK_FRAME_OVERHEAD; \ - EXC_XFER_STD(0x800, kernel_fp_unavailable_exception) +1: EXC_XFER_STD(0x800, kernel_fp_unavailable_exception) #else /* __ASSEMBLY__ */ struct exception_regs { |