summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam.mj@au1.ibm.com>2015-07-22 11:09:15 +1000
committerJoel Stanley <joel@jms.id.au>2015-08-17 14:48:27 +0930
commit8adc30a30b88c793c2058e85426f4f94158797ad (patch)
tree382a089898523612b3340c1398b764c671810d20
parenta8193732b435b8c7174485b9eb8201ff260e56b6 (diff)
downloadtalos-op-linux-3.17.2-openpower1.tar.gz
talos-op-linux-3.17.2-openpower1.zip
powerpc/kexec: Reset HILE before kexec_sequencev3.17.2-openpower1
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 endianess. 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 <sam.mj@au1.ibm.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
-rw-r--r--arch/powerpc/platforms/powernv/setup.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c
index 5a0e2dc6de5f..b19e1ab8db06 100644
--- a/arch/powerpc/platforms/powernv/setup.c
+++ b/arch/powerpc/platforms/powernv/setup.c
@@ -243,6 +243,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 */
OpenPOWER on IntegriCloud