linux/arch/powerpc/platforms
Alexey Kardashevskiy 9410e0185e powerpc/iommu/ddw: Fix endianness
rtas_call() accepts and returns values in CPU endianness.
The ddw_query_response and ddw_create_response structs members are
defined and treated as BE but as they are passed to rtas_call() as
(u32 *) and they get byteswapped automatically, the data is CPU-endian.
This fixes ddw_query_response and ddw_create_response definitions and use.

of_read_number() is designed to work with device tree cells - it assumes
the input is big-endian and returns data in CPU-endian. However due
to the ddw_create_response struct fix, create.addr_hi/lo are already
CPU-endian so do not byteswap them.

ddw_avail is a pointer to the "ibm,ddw-applicable" property which contains
3 cells which are big-endian as it is a device tree. rtas_call() accepts
a RTAS token in CPU-endian. This makes use of of_property_read_u32_array
to byte swap and avoid the need for a number of be32_to_cpu calls.

Cc: stable@vger.kernel.org # v3.13+
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
[aik: folded Anton's patch with of_property_read_u32_array]
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Acked-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2014-10-03 14:22:34 +10:00
..
8xx powerpc: make of_device_ids const 2014-09-25 23:14:46 +10:00
40x powerpc: make of_device_ids const 2014-09-25 23:14:46 +10:00
44x powerpc: Fix build failure when CONFIG_USB=y 2014-09-25 23:14:54 +10:00
52xx powerpc: make of_device_ids const 2014-09-25 23:14:46 +10:00
82xx powerpc: make of_device_ids const 2014-09-25 23:14:46 +10:00
83xx powerpc: make of_device_ids const 2014-09-25 23:14:46 +10:00
85xx powerpc: make of_device_ids const 2014-09-25 23:14:46 +10:00
86xx powerpc: make of_device_ids const 2014-09-25 23:14:46 +10:00
512x powerpc: make of_device_ids const 2014-09-25 23:14:46 +10:00
amigaone lib/scatterlist: make ARCH_HAS_SG_CHAIN an actual Kconfig 2014-08-08 15:57:26 -07:00
cell powerpc: make of_device_ids const 2014-09-25 23:14:46 +10:00
chrp powerpc: Remove powerpc specific cmd_line 2014-10-02 17:33:55 +10:00
embedded6xx powerpc: make of_device_ids const 2014-09-25 23:14:46 +10:00
maple POWERPC: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
pasemi powerpc: make of_device_ids const 2014-09-25 23:14:46 +10:00
powermac powerpc: Remove powerpc specific cmd_line 2014-10-02 17:33:55 +10:00
powernv powerpc: Add printk levels to powernv platform code 2014-10-02 17:33:55 +10:00
ps3 Merge branch 'powernv-cpuidle' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2014-04-02 13:47:29 -07:00
pseries powerpc/iommu/ddw: Fix endianness 2014-10-03 14:22:34 +10:00
fsl_uli1575.c of/irq: Refactor interrupt-map parsing 2013-10-24 11:43:04 +01:00
Kconfig powerpc: Remove platforms/wsp and associated pieces 2014-06-11 16:35:38 +10:00
Kconfig.cputype powerpc: Use CONFIG_ARCH_HAS_FAST_MULTIPLIER 2014-09-25 23:14:49 +10:00
Makefile powerpc: Remove platforms/wsp and associated pieces 2014-06-11 16:35:38 +10:00