powerpc/pseries: Little endian fixes for post mobility device tree update
authorTyrel Datwyler <tyreld@linux.vnet.ibm.com>
Wed, 4 Mar 2015 19:59:33 +0000 (11:59 -0800)
committerSasha Levin <sasha.levin@oracle.com>
Fri, 17 Apr 2015 00:13:17 +0000 (20:13 -0400)
commit950b82542ce77ef7f6be8980be3a54b0e391f43c
tree44c7116589fe588c201a48ca045ad12348e44606
parent20ecb85c6e0c815de560b6b56409e9e89183d5c6
powerpc/pseries: Little endian fixes for post mobility device tree update

[ Upstream commit f6ff04149637723261aa4738958b0098b929ee9e ]

We currently use the device tree update code in the kernel after resuming
from a suspend operation to re-sync the kernels view of the device tree with
that of the hypervisor. The code as it stands is not endian safe as it relies
on parsing buffers returned by RTAS calls that thusly contains data in big
endian format.

This patch annotates variables and structure members with __be types as well
as performing necessary byte swaps to cpu endian for data that needs to be
parsed.

Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Cc: Cyril Bur <cyrilbur@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
arch/powerpc/platforms/pseries/mobility.c