]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Apr 2015 12:03:56 +0000 (14:03 +0200)
commit78db0115d87fc97513a84fb739ee74d1af34aef2
tree4278e0f90ae7190299e1a5998a721f285cd3bec8
parentf179d6a3e20afc890989c96df3d873daee0fed09
powerpc/pseries: Little endian fixes for post mobility device tree update

commit f6ff04149637723261aa4738958b0098b929ee9e upstream.

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>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/platforms/pseries/mobility.c