diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2021-03-12 15:50:22 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-03-29 05:22:05 +0300 |
commit | 7aa8dd67f15731f659390018b5c9fd95f5975b3d (patch) | |
tree | dae28ba3fe83b21967409a57738f19d28e7a1b1d /arch/powerpc/kernel/head_40x.S | |
parent | 5747230645562921b5bc19f6409f7af08fe17c6d (diff) | |
download | linux-7aa8dd67f15731f659390018b5c9fd95f5975b3d.tar.xz |
powerpc/32: Always enable data translation in exception prolog
If the code can use a stack in vm area, it can also use a
stack in linear space.
Simplify code by removing old non VMAP stack code on PPC32.
That means the data translation is now re-enabled early in
exception prolog in all cases, not only when using VMAP stacks.
While we are touching EXCEPTION_PROLOG macros, remove the
unused for_rtas parameter in EXCEPTION_PROLOG_1.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/7cd6440c60a7e8f4f035b245c57720f51e225aae.1615552866.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/kernel/head_40x.S')
-rw-r--r-- | arch/powerpc/kernel/head_40x.S | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/arch/powerpc/kernel/head_40x.S b/arch/powerpc/kernel/head_40x.S index 72e4962902de..7da673ec63ef 100644 --- a/arch/powerpc/kernel/head_40x.S +++ b/arch/powerpc/kernel/head_40x.S @@ -111,12 +111,10 @@ _ENTRY(crit_esr) mfspr r11,SPRN_SRR1 stw r10,crit_srr0@l(0) stw r11,crit_srr1@l(0) -#ifdef CONFIG_VMAP_STACK mfspr r10,SPRN_DEAR mfspr r11,SPRN_ESR stw r10,crit_dear@l(0) stw r11,crit_esr@l(0) -#endif mfcr r10 /* save CR in r10 for now */ mfspr r11,SPRN_SRR3 /* check whether user or kernel */ andi. r11,r11,MSR_PR @@ -126,7 +124,6 @@ _ENTRY(crit_esr) /* COMING FROM USER MODE */ mfspr r11,SPRN_SPRG_THREAD /* if from user, start at top of */ lwz r11,TASK_STACK-THREAD(r11) /* this thread's kernel stack */ -#ifdef CONFIG_VMAP_STACK 1: stw r1,crit_r1@l(0) addi r1,r11,THREAD_SIZE-INT_FRAME_SIZE /* Alloc an excpt frm */ LOAD_REG_IMMEDIATE(r11,MSR_KERNEL & ~(MSR_IR | MSR_RI)) @@ -136,35 +133,18 @@ _ENTRY(crit_esr) stw r11,GPR1(r1) stw r11,0(r1) mr r11,r1 -#else -1: addi r11,r11,THREAD_SIZE-INT_FRAME_SIZE /* Alloc an excpt frm */ - tophys(r11,r11) - stw r1,GPR1(r11) - stw r1,0(r11) - tovirt(r1,r11) -#endif stw r10,_CCR(r11) /* save various registers */ stw r12,GPR12(r11) stw r9,GPR9(r11) mflr r10 stw r10,_LINK(r11) -#ifdef CONFIG_VMAP_STACK lis r9,PAGE_OFFSET@ha lwz r10,crit_r10@l(r9) lwz r12,crit_r11@l(r9) -#else - lwz r10,crit_r10@l(0) - lwz r12,crit_r11@l(0) -#endif stw r10,GPR10(r11) stw r12,GPR11(r11) -#ifdef CONFIG_VMAP_STACK lwz r12,crit_dear@l(r9) lwz r9,crit_esr@l(r9) -#else - mfspr r12,SPRN_DEAR /* save DEAR and ESR in the frame */ - mfspr r9,SPRN_ESR /* in them at the point where the */ -#endif stw r12,_DEAR(r11) /* since they may have had stuff */ stw r9,_ESR(r11) /* exception was taken */ mfspr r12,SPRN_SRR2 @@ -220,7 +200,6 @@ _ENTRY(crit_esr) */ START_EXCEPTION(0x0300, DataStorage) EXCEPTION_PROLOG handle_dar_dsisr=1 - save_dar_dsisr_on_stack r4, r5, r11 EXC_XFER_LITE(0x300, handle_page_fault) /* @@ -240,14 +219,12 @@ _ENTRY(crit_esr) /* 0x0600 - Alignment Exception */ START_EXCEPTION(0x0600, Alignment) EXCEPTION_PROLOG handle_dar_dsisr=1 - save_dar_dsisr_on_stack r4, r5, r11 addi r3,r1,STACK_FRAME_OVERHEAD EXC_XFER_STD(0x600, alignment_exception) /* 0x0700 - Program Exception */ START_EXCEPTION(0x0700, ProgramCheck) EXCEPTION_PROLOG handle_dar_dsisr=1 - save_dar_dsisr_on_stack r4, r5, r11 addi r3,r1,STACK_FRAME_OVERHEAD EXC_XFER_STD(0x700, program_check_exception) |