mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-11 02:59:12 +00:00
powerpc/64: Fix booting large kernels with STRICT_KERNEL_RWX
[ Upstream commit56c46bba9b
] With STRICT_KERNEL_RWX enabled anything marked __init is placed at a 16M boundary. This is necessary so that it can be repurposed later with different permissions. However, in kernels with text larger than 16M, this pushes early_setup past 32M, incapable of being reached by the branch instruction. Fix this by setting the CTR and branching there instead. Fixes:1e0fc9d1eb
("powerpc/Kconfig: Enable STRICT_KERNEL_RWX for some configs") Signed-off-by: Russell Currey <ruscur@russell.cc> [mpe: Fix it to work on BE by using DOTSYM()] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
f488832c20
commit
fec8a09f79
1 changed files with 3 additions and 1 deletions
|
@ -970,7 +970,9 @@ start_here_multiplatform:
|
||||||
|
|
||||||
/* Restore parameters passed from prom_init/kexec */
|
/* Restore parameters passed from prom_init/kexec */
|
||||||
mr r3,r31
|
mr r3,r31
|
||||||
bl early_setup /* also sets r13 and SPRG_PACA */
|
LOAD_REG_ADDR(r12, DOTSYM(early_setup))
|
||||||
|
mtctr r12
|
||||||
|
bctrl /* also sets r13 and SPRG_PACA */
|
||||||
|
|
||||||
LOAD_REG_ADDR(r3, start_here_common)
|
LOAD_REG_ADDR(r3, start_here_common)
|
||||||
ld r4,PACAKMSR(r13)
|
ld r4,PACAKMSR(r13)
|
||||||
|
|
Loading…
Reference in a new issue