]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/64: Fix booting large kernels with STRICT_KERNEL_RWX
authorRussell Currey <ruscur@russell.cc>
Wed, 27 Mar 2019 03:35:54 +0000 (14:35 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Sat, 20 Apr 2019 12:02:12 +0000 (22:02 +1000)
commit92c0f39629d8281d11c9ceeae64894f1d360fede
tree2774a129f5696d9167a8500a1f1d25671f93b96b
parent76d7753fe6c9b4f8d1c27d6375282d064a7615ae
powerpc/64: Fix booting large kernels with STRICT_KERNEL_RWX

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: e338dc2f3710 ("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>
arch/powerpc/kernel/head_64.S