]> git.baikalelectronics.ru Git - kernel.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)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 20 Mar 2015 03:53:01 +0000 (14:53 +1100)
commit8f8d3c8858eddfe29f6b5e8b7f2e460f53425326
tree12c6531884d344438e9e5676ce9102f6912f7915
parent51409c09e4acd61b2e7e2705f14b739b3cf1d23a
powerpc/pseries: Little endian fixes for post mobility device tree update

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>
arch/powerpc/platforms/pseries/mobility.c