]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/32: Fix crash during static key init
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 10 Aug 2016 07:27:34 +0000 (17:27 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 10 Aug 2016 09:41:58 +0000 (19:41 +1000)
commit849bdc253495b73c20d76cb93d431a0df34e82a4
treee2662c33b890c9715a6af4ab8f52cb81db00bf4b
parent4a3261306d06842243bb6da1e121ba165dd6f67f
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: c52f0f22dfdb ("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>
arch/powerpc/include/asm/feature-fixups.h
arch/powerpc/kernel/setup_32.c
arch/powerpc/kernel/setup_64.c
arch/powerpc/lib/feature-fixups.c