OpenCloudOS-Kernel/arch/powerpc/platforms/pseries
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
..
Kconfig powerpc/powernv: Enable POWER8 doorbell IPIs 2014-06-11 17:05:12 +10:00
Makefile powerpc/pseries/cpuidle: Move processor_idle.c to drivers/cpuidle. 2014-01-29 17:02:22 +11:00
cmm.c powerpc/pseries: Drop unnecessary continue 2014-09-23 11:00:40 +10:00
dlpar.c pseries: Fix endian issues in cpu hot-removal 2014-09-25 23:14:48 +10:00
dtl.c powerpc/pseries: Switch pseries drivers to use machine_xxx_initcall() 2014-07-28 14:11:26 +10:00
eeh_pseries.c powerpc/pseries: Decrease message level on EEH initialization 2014-09-30 17:15:16 +10:00
event_sources.c of/irq: simplify args to irq_create_of_mapping 2013-10-24 11:42:57 +01:00
firmware.c powerpc/pseries: Update CPU maps when device tree is updated 2013-04-26 16:08:23 +10:00
hotplug-cpu.c pseries: Fix endian issues in cpu hot-removal 2014-09-25 23:14:48 +10:00
hotplug-memory.c powerpc: Ensure global functions include their prototype 2014-09-25 23:14:42 +10:00
hvCall.S powerpc/pseries: Optimise hcall tracepoints 2014-07-11 16:06:03 +10:00
hvCall_inst.c powerpc/pseries: Switch pseries drivers to use machine_xxx_initcall() 2014-07-28 14:11:26 +10:00
hvconsole.c pseries: Move plpar_wrapper.h to powerpc common include/asm location. 2013-08-27 14:43:05 +10:00
hvcserver.c powerpc/pseries/hvcserver: Fix endian issue in hvcs_get_partner_info 2014-08-13 15:14:04 +10:00
io_event_irq.c powerpc/le: Enable RTAS events support 2014-04-07 10:33:12 +10:00
iommu.c powerpc/iommu/ddw: Fix endianness 2014-10-03 14:22:34 +10:00
kexec.c pseries: Move plpar_wrapper.h to powerpc common include/asm location. 2013-08-27 14:43:05 +10:00
lpar.c powerpc/jump_label: use HAVE_JUMP_LABEL? 2014-09-25 23:14:45 +10:00
lparcfg.c powerpc/pseries: Fix endian issues in /proc/ppc64/lparcfg 2013-12-13 15:48:35 +11:00
mobility.c arch/powerpc: replace obsolete strict_strto* calls 2014-08-08 15:57:28 -07:00
msi.c powerpc/pseries: Switch pseries drivers to use machine_xxx_initcall() 2014-07-28 14:11:26 +10:00
nvram.c powerpc: Make a bunch of things static 2014-09-25 23:14:41 +10:00
offline_states.h powerpc/smp: soft-replugged CPUs must go back to start_secondary 2011-04-01 15:37:09 +11:00
pci.c powerpc: Ensure global functions include their prototype 2014-09-25 23:14:42 +10:00
pci_dlpar.c powerpc/pci: Reorder pci bus/bridge unregistration during PHB removal 2014-08-05 15:40:58 +10:00
power.c powerpc/pseries: Switch pseries drivers to use machine_xxx_initcall() 2014-07-28 14:11:26 +10:00
pseries.h powerpc: Allow ppc_md platform hook to override memory_block_size_bytes 2014-06-05 13:20:39 +10:00
pseries_energy.c powerpc: Fix a number of sparse warnings 2013-08-14 11:50:24 +10:00
ras.c powerpc: Make a bunch of things static 2014-09-25 23:14:41 +10:00
reconfig.c powerpc/pseries: Switch pseries drivers to use machine_xxx_initcall() 2014-07-28 14:11:26 +10:00
rng.c powerpc/pseries: Switch pseries drivers to use machine_xxx_initcall() 2014-07-28 14:11:26 +10:00
scanlog.c ppc: Clean up scanlog 2013-05-01 17:29:45 -04:00
setup.c powerpc: Make a bunch of things static 2014-09-25 23:14:41 +10:00
smp.c powerpc: Fix SMP issues with ppc64le ABIv2 2014-04-23 10:05:26 +10:00
suspend.c powerpc/pseries: Switch pseries drivers to use machine_xxx_initcall() 2014-07-28 14:11:26 +10:00