powerpc/le: Ensure that the 'stop-self' RTAS token is handled correctly
authorTony Breeds <tony@bakeyournoodle.com>
Thu, 20 Feb 2014 10:13:52 +0000 (21:13 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Mar 2014 05:30:08 +0000 (21:30 -0800)
commit64747d3d2fd4fcf93678ccc785327371e35a752e
tree045d3a68c3ea32c465178e5165b4661240988d4d
parent830d5bd83a895818388f874675d3bd76dc470e01
powerpc/le: Ensure that the 'stop-self' RTAS token is handled correctly

commit 41dd03a94c7d408d2ef32530545097f7d1befe5c upstream.

Currently we're storing a host endian RTAS token in
rtas_stop_self_args.token.  We then pass that directly to rtas.  This is
fine on big endian however on little endian the token is not what we
expect.

This will typically result in hitting:
panic("Alas, I survived.\n");

To fix this we always use the stop-self token in host order and always
convert it to be32 before passing this to rtas.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/platforms/pseries/hotplug-cpu.c