linux/arch/powerpc
Laurent Dufour 17de731810 powerpc/pseries: Fix endiannes issue in RTAS call from xmon
commit 3b8a3c0109 upstream.

On pseries system (LPAR) xmon failed to enter when running in LE mode,
system is hunging. Inititating xmon will lead to such an output on the
console:

SysRq : Entering xmon
cpu 0x15: Vector: 0  at [c0000003f39ffb10]
    pc: c00000000007ed7c: sysrq_handle_xmon+0x5c/0x70
    lr: c00000000007ed7c: sysrq_handle_xmon+0x5c/0x70
    sp: c0000003f39ffc70
   msr: 8000000000009033
  current = 0xc0000003fafa7180
  paca    = 0xc000000007d75e80	 softe: 0	 irq_happened: 0x01
    pid   = 14617, comm = bash
Bad kernel stack pointer fafb4b0 at eca7cc4
cpu 0x15: Vector: 300 (Data Access) at [c000000007f07d40]
    pc: 000000000eca7cc4
    lr: 000000000eca7c44
    sp: fafb4b0
   msr: 8000000000001000
   dar: 10000000
 dsisr: 42000000
  current = 0xc0000003fafa7180
  paca    = 0xc000000007d75e80	 softe: 0	 irq_happened: 0x01
    pid   = 14617, comm = bash
cpu 0x15: Exception 300 (Data Access) in xmon, returning to main loop
xmon: WARNING: bad recursive fault on cpu 0x15

The root cause is that xmon is calling RTAS to turn off the surveillance
when entering xmon, and RTAS is requiring big endian parameters.

This patch is byte swapping the RTAS arguments when running in LE mode.

Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-06 15:55:36 -08:00
..
boot Merge remote-tracking branch 'agust/next' into next 2014-01-29 16:53:55 +11:00
configs Merge remote-tracking branch 'scott/next' into next 2014-01-15 14:22:35 +11:00
crypto powerpc: Fix compile of sha1-powerpc-asm.S on 32-bit 2013-03-05 16:56:26 +11:00
include powerpc: Add smp_mb() to arch_spin_is_locked() 2014-10-05 14:52:21 -07:00
kernel powerpc: Don't skip ePAPR spin-table CPUs 2014-07-06 18:57:28 -07:00
kvm KVM: PPC: Book3S HV: Fix KVM hang with CONFIG_KVM_XICS=n 2014-05-13 13:32:48 +02:00
lib powerpc: Add smp_mb()s to arch_spin_unlock_wait() 2014-10-05 14:52:21 -07:00
math-emu powerpc: fix e500 SPE float SIGFPE generation 2014-01-07 18:43:42 -06:00
mm powerpc/thp: Use ACCESS_ONCE when loading pmdp 2014-09-17 09:19:11 -07:00
net bpf: do not use reciprocal divide 2014-01-15 17:02:08 -08:00
oprofile powerpc: Delete non-required instances of include <linux/init.h> 2014-01-15 13:46:44 +11:00
perf powerpc/perf: Fix ABIv2 kernel backtraces 2014-10-05 14:52:21 -07:00
platforms powerpc/pseries: Honor the generic "no_64bit_msi" flag 2014-12-06 15:55:35 -08:00
sysdev powerpc: Fix build failure in sysdev/mpic.c for MPIC_WEIRD=y 2014-02-11 11:24:45 +11:00
xmon powerpc/pseries: Fix endiannes issue in RTAS call from xmon 2014-12-06 15:55:36 -08:00
Kconfig locking/mutex: Disable optimistic spinning on some architectures 2014-07-28 08:06:03 -07:00
Kconfig.debug Merge branch 'kconfig-diet' from Dave Hansen 2013-07-04 11:25:51 -07:00
Makefile powerpc: Fix 64 bit builds with binutils 2.24 2014-06-07 10:28:28 -07:00
relocs_check.pl Fix warning typo "CONFIG_RELCOATABLE" 2013-05-29 15:11:30 +02:00