From: Samuel Mendoza-Jonas Date: Wed, 22 Jul 2015 05:50:51 +0000 (+1000) Subject: powerpc/powernv: Reset HILE before kexec_sequence() X-Git-Tag: v4.3-rc1~86^2~13 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e72bb8a5a884d022231149d407653923a1d79e53;p=karo-tx-linux.git powerpc/powernv: Reset HILE before kexec_sequence() On powernv secondary cpus are returned to OPAL, and will then enter the target kernel in big-endian. However if it is set the HILE bit will persist, causing the first exception in the target kernel to be delivered in litte-endian regardless of the current endianness. If running on top of OPAL make sure the HILE bit is reset once we've finished waiting for all of the secondaries to be returned to OPAL. Signed-off-by: Samuel Mendoza-Jonas Signed-off-by: Michael Ellerman --- diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c index 77a31c1474a5..685b3cbe1362 100644 --- a/arch/powerpc/platforms/powernv/setup.c +++ b/arch/powerpc/platforms/powernv/setup.c @@ -235,6 +235,13 @@ static void pnv_kexec_cpu_down(int crash_shutdown, int secondary) } else { /* Primary waits for the secondaries to have reached OPAL */ pnv_kexec_wait_secondaries_down(); + + /* + * We might be running as little-endian - now that interrupts + * are disabled, reset the HILE bit to big-endian so we don't + * take interrupts in the wrong endian later + */ + opal_reinit_cpus(OPAL_REINIT_CPUS_HILE_BE); } } #endif /* CONFIG_KEXEC */