Our Little Endian kernels can now live in a world where they are
running with Big Endian interrupts enabled. That is great for kexec,
because now we don't have to switch back to Big Endian mode.
Indicate this in the code. Only try to go into Big Endian mode when
we're not already there yet.
Signed-off-by: Alexander Graf <redacted>
---
arch/powerpc/platforms/pseries/setup.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index fb5d98c..7db1cf1 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -446,10 +446,15 @@ static void pSeries_machine_kexec(struct kimage *image)
#endif
#ifdef __LITTLE_ENDIAN__
+static bool ile_enabled;
+
long pseries_big_endian_exceptions(void)
{
long rc;
+ if (!ile_enabled)
+ return H_SUCCESS;
+
while (1) {
rc = enable_big_endian_exceptions();
if (!H_IS_LONG_BUSY(rc))@@ -498,8 +503,12 @@ static long pseries_little_endian_exceptions(void)
while (1) {
rc = enable_little_endian_exceptions();
- if (!H_IS_LONG_BUSY(rc))
+
+ if (!H_IS_LONG_BUSY(rc)) {
+ ile_enabled = true;
return rc;
+ }
+
mdelay(get_longbusy_msecs(rc));
}
}--
1.8.1.4