powerpc/nvram: Fix endian issue when using the partition length
authorCedric Le Goater <clg@fr.ibm.com>
Wed, 30 Oct 2013 13:47:08 +0000 (14:47 +0100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 31 Oct 2013 01:37:28 +0000 (12:37 +1100)
commitc81095a465b2c1cd819fb14ee3cd07bc1b377af1
treeee9eb8e0c6f30ae8d7c5adf47d12abd1e81fca18
parent563c5d8af5d56739bc31f9f4b1c8a0994ed5742c
powerpc/nvram: Fix endian issue when using the partition length

When reading partitions, the length has to be translated from
big endian to the endian order of the host. Similarly, when writing
partitions, the length needs to be in big endian order.

The userspace tool 'nvram' needs a similar fix as it is reading
and writing partitions through /dev/nram :

    http://sourceforge.net/p/powerpc-utils/mailman/message/31571277/

Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/nvram_64.c