]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pseries: Fix endian issues in nvram code
authorAnton Blanchard <anton@samba.org>
Thu, 12 Dec 2013 04:59:38 +0000 (15:59 +1100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 13 Dec 2013 04:48:36 +0000 (15:48 +1100)
commita856e286453088828dffdf96e16d7f00e7cc2b8c
tree4fcea94434dbf3b12df2632ee36505bbeaf87804
parent74fbcd044d97daa671b6b133c8463a82c77e66d3
powerpc/pseries: Fix endian issues in nvram code

The NVRAM code has a number of endian issues. I noticed a very
confused error log count:

RTAS: 100663330 -------- RTAS event begin --------

100663330 == 0x06000022. 0x6 LE error logs and 0x22 BE error logs.

The pstore code has similar issues - if we write an oops in one
endian and attempt to read it in another we get junk.

Make both of these formats big endian, and byteswap as required.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/pseries/nvram.c