Re: [PATCH v2] powerpc/iommu/ddw: Fix endianness

2014-09-23 Thread Anton Blanchard
Hi Alexey, > 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 converts RTAS > tokens from big-endian to CPU-endian. Since every token is used once > till guest

Re: [PATCH v2] powerpc/iommu/ddw: Fix endianness

2014-09-23 Thread Anton Blanchard
Hi Alexey, 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 converts RTAS tokens from big-endian to CPU-endian. Since every token is used once till guest is

[PATCH v2] powerpc/iommu/ddw: Fix endianness

2014-09-22 Thread Alexey Kardashevskiy
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 actually CPU-endian. This fixes

[PATCH v2] powerpc/iommu/ddw: Fix endianness

2014-09-22 Thread Alexey Kardashevskiy
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 actually CPU-endian. This fixes