diff options
author | Jiri Kosina <jkosina@suse.cz> | 2017-11-15 13:04:13 +0300 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2017-11-15 13:04:13 +0300 |
commit | 5cc619db5c34146ee821acd08382b9d78579b52e (patch) | |
tree | ee28e3cefdb35d56e33887f05db0a50589aa5883 /arch/powerpc/platforms/pseries/ras.c | |
parent | 83fd5ddc19931d5a5b884c43ee3c9d69c673bc96 (diff) | |
parent | 287b8e11972f934052f4ed0751df465a5e84b69c (diff) | |
download | linux-5cc619db5c34146ee821acd08382b9d78579b52e.tar.xz |
Merge branch 'for-4.15/alps' into for-linus
- New ALPS touchpad (T4, found currently on HP EliteBook 1000, Zbook Stduio
and HP Elite book x360) support from Masaki Ota
Diffstat (limited to 'arch/powerpc/platforms/pseries/ras.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/ras.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c index bb70b26334f0..4923ffe230cf 100644 --- a/arch/powerpc/platforms/pseries/ras.c +++ b/arch/powerpc/platforms/pseries/ras.c @@ -379,6 +379,21 @@ static void fwnmi_release_errinfo(void) int pSeries_system_reset_exception(struct pt_regs *regs) { +#ifdef __LITTLE_ENDIAN__ + /* + * Some firmware byteswaps SRR registers and gives incorrect SRR1. Try + * to detect the bad SRR1 pattern here. Flip the NIP back to correct + * endian for reporting purposes. Unfortunately the MSR can't be fixed, + * so clear it. It will be missing MSR_RI so we won't try to recover. + */ + if ((be64_to_cpu(regs->msr) & + (MSR_LE|MSR_RI|MSR_DR|MSR_IR|MSR_ME|MSR_PR| + MSR_ILE|MSR_HV|MSR_SF)) == (MSR_DR|MSR_SF)) { + regs->nip = be64_to_cpu((__be64)regs->nip); + regs->msr = 0; + } +#endif + if (fwnmi_active) { struct rtas_error_log *errhdr = fwnmi_get_errinfo(regs); if (errhdr) { |