From dc13b889b586f499cc87eb2b0b7e901778b3b5cf Mon Sep 17 00:00:00 2001 From: Christophe Leroy Date: Fri, 12 Mar 2021 12:50:29 +0000 Subject: powerpc/32: Move exception prolog code into .text once MMU is back on The space in the head section is rather constrained by the fact that exception vectors are spread every 0x100 bytes and sometimes we need to have "out of line" code because it doesn't fit. Now that we are enabling MMU early in the prolog, take that opportunity to jump somewhere else in the .text section where we don't have any space constraint. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/38b31ca4bc782a4985bc7952a675404d7ff27c24.1615552867.git.christophe.leroy@csgroup.eu --- arch/powerpc/kernel/head_40x.S | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/powerpc/kernel/head_40x.S') diff --git a/arch/powerpc/kernel/head_40x.S b/arch/powerpc/kernel/head_40x.S index c14a71e0d6d3..e7d8856714d3 100644 --- a/arch/powerpc/kernel/head_40x.S +++ b/arch/powerpc/kernel/head_40x.S @@ -132,6 +132,8 @@ _ENTRY(crit_esr) ori r11, r11, 1f@l mtspr SPRN_SRR0, r11 rfi + + .text 1: lwz r11,crit_r1@l(0) stw r11,GPR1(r1) @@ -496,6 +498,7 @@ _ENTRY(crit_esr) crit_transfer_to_handler, ret_from_crit_exc) /* Programmable Interval Timer (PIT) Exception. (from 0x1000) */ + __HEAD Decrementer: EXCEPTION_PROLOG lis r0,TSR_PIS@h @@ -504,12 +507,14 @@ Decrementer: EXC_XFER_LITE(0x1000, timer_interrupt) /* Fixed Interval Timer (FIT) Exception. (from 0x1010) */ + __HEAD FITException: EXCEPTION_PROLOG addi r3,r1,STACK_FRAME_OVERHEAD; EXC_XFER_STD(0x1010, unknown_exception) /* Watchdog Timer (WDT) Exception. (from 0x1020) */ + __HEAD WDTException: CRITICAL_EXCEPTION_PROLOG; addi r3,r1,STACK_FRAME_OVERHEAD; @@ -523,6 +528,7 @@ WDTException: * reserved. */ + __HEAD /* Damn, I came up one instruction too many to fit into the * exception space :-). Both the instruction and data TLB * miss get to this point to load the TLB. -- cgit v1.2.3-59-g8ed1b