From: Thomas Falcon Date: Tue, 5 Aug 2014 21:42:39 +0000 (-0500) Subject: powerpc/pseries/hvcserver: Fix endian issue in hvcs_get_partner_info X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=587870e8650a0571e895cc879cd895c78c6391bf;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git powerpc/pseries/hvcserver: Fix endian issue in hvcs_get_partner_info A buffer returned by H_VTERM_PARTNER_INFO contains device information in big endian format, causing problems for little endian architectures. This patch ensures that they are in cpu endian. Signed-off-by: Thomas Falcon Signed-off-by: Benjamin Herrenschmidt --- diff --git a/arch/powerpc/platforms/pseries/hvcserver.c b/arch/powerpc/platforms/pseries/hvcserver.c index 4557e91626c4..eedb64594dc5 100644 --- a/arch/powerpc/platforms/pseries/hvcserver.c +++ b/arch/powerpc/platforms/pseries/hvcserver.c @@ -163,8 +163,8 @@ int hvcs_get_partner_info(uint32_t unit_address, struct list_head *head, return retval; } - last_p_partition_ID = pi_buff[0]; - last_p_unit_address = pi_buff[1]; + last_p_partition_ID = be64_to_cpu(pi_buff[0]); + last_p_unit_address = be64_to_cpu(pi_buff[1]); /* This indicates that there are no further partners */ if (last_p_partition_ID == ~0UL