diff options
author | Anton Blanchard <anton@samba.org> | 2013-11-20 22:14:59 +1100 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-11-21 09:19:16 +1100 |
commit | e844b1eeae42dc93bf13e67812a95ee7b58be8c7 (patch) | |
tree | 7c36d37d883ed5ec6b386277c38e20d9485fdaca /arch/powerpc/platforms/pseries/lpar.c | |
parent | b91da2d4ce896c324bdbf1a078dbbe2db9a35ef1 (diff) | |
download | blackbird-op-linux-e844b1eeae42dc93bf13e67812a95ee7b58be8c7.tar.gz blackbird-op-linux-e844b1eeae42dc93bf13e67812a95ee7b58be8c7.zip |
pseries: Add H_SET_MODE to change exception endianness
On little endian builds call H_SET_MODE so exceptions have the
correct endianness. We need to reset the endian during kexec
so do that in the MMU hashtable clear callback.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries/lpar.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/lpar.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c index 356bc75ca74f..4fca3def9db9 100644 --- a/arch/powerpc/platforms/pseries/lpar.c +++ b/arch/powerpc/platforms/pseries/lpar.c @@ -245,6 +245,23 @@ static void pSeries_lpar_hptab_clear(void) &(ptes[j].pteh), &(ptes[j].ptel)); } } + +#ifdef __LITTLE_ENDIAN__ + /* Reset exceptions to big endian */ + if (firmware_has_feature(FW_FEATURE_SET_MODE)) { + long rc; + + rc = pseries_big_endian_exceptions(); + /* + * At this point it is unlikely panic() will get anything + * out to the user, but at least this will stop us from + * continuing on further and creating an even more + * difficult to debug situation. + */ + if (rc) + panic("Could not enable big endian exceptions"); + } +#endif } /* |