]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pseries/le: Work around a firmware quirk
authorNicholas Piggin <npiggin@gmail.com>
Wed, 5 Jul 2017 03:56:26 +0000 (13:56 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 31 Aug 2017 04:26:02 +0000 (14:26 +1000)
commit5622ea498a6a4eea3be3a24c663940527469f4be
tree6ee5925c92b291c104f242d9cc975d7b23713cf1
parent7cdd7e95c62c048d84f8e8e9eb103ceea81cd2c9
powerpc/pseries/le: Work around a firmware quirk

Some PowerVM firmware when delivering a system reset interrupt to a
little endian OS will mess up SRR registers. They are byteswapped, and
SRR1 is incorrect. An example from a crash:

  NIP: 14dd0900000000c0
  MSR: 1000000200000080

It's possible to detect this pattern in SRR1 (that would never happen
in normal operation), and at least fix the NIP. After this patch, the
same interrupt reports NIP properly:

  NIP [c00000000009dd14] plpar_hcall_norets+0x1c/0x28

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/pseries/ras.c