summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/setup_32.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2016-08-10 09:27:34 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2016-08-10 11:41:58 +0200
commit97f6e0cc35026a2a09147a6da636d901525e1969 (patch)
treee2662c33b890c9715a6af4ab8f52cb81db00bf4b /arch/powerpc/kernel/setup_32.c
parentpowerpc: Update obsolete comment in setup_32.c about early_init() (diff)
downloadlinux-97f6e0cc35026a2a09147a6da636d901525e1969.tar.xz
linux-97f6e0cc35026a2a09147a6da636d901525e1969.zip
powerpc/32: Fix crash during static key init
We cannot do those initializations from apply_feature_fixups() as this function runs in a very restricted environment on 32-bit where the kernel isn't running at its linked address and the PTRRELOC() macro must be used for any global accesss. Instead, split them into a separtate steup_feature_keys() function which is called in a more suitable spot on ppc32. Fixes: 309b315b6ec6 ("powerpc: Call jump_label_init() in apply_feature_fixups()") Reported-and-tested-by: Christian Kujau <lists@nerdbynature.de> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/setup_32.c')
-rw-r--r--arch/powerpc/kernel/setup_32.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index f10a975baa5e..24ec3ea4b3a2 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -100,6 +100,9 @@ extern unsigned int memset_nocache_branch; /* Insn to be replaced by NOP */
notrace void __init machine_init(u64 dt_ptr)
{
+ /* Configure static keys first, now that we're relocated. */
+ setup_feature_keys();
+
/* Enable early debugging if any specified (see udbg.h) */
udbg_early_init();