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_32.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/powerpc/kernel/head_32.h') diff --git a/arch/powerpc/kernel/head_32.h b/arch/powerpc/kernel/head_32.h index d97ec94b34da..3c0aa4538514 100644 --- a/arch/powerpc/kernel/head_32.h +++ b/arch/powerpc/kernel/head_32.h @@ -70,6 +70,8 @@ mtspr SPRN_SRR0, r11 mfspr r11, SPRN_SPRG_SCRATCH2 rfi + + .text 1: stw r11,GPR1(r1) stw r11,0(r1) @@ -163,12 +165,14 @@ */ #ifdef CONFIG_PPC_BOOK3S #define START_EXCEPTION(n, label) \ + __HEAD; \ . = n; \ DO_KVM n; \ label: #else #define START_EXCEPTION(n, label) \ + __HEAD; \ . = n; \ label: @@ -196,6 +200,7 @@ label: ret_from_except) .macro vmap_stack_overflow_exception + __HEAD vmap_stack_overflow: #ifdef CONFIG_SMP mfspr r1, SPRN_SPRG_THREAD -- cgit