powerpc/hotplug-mem: Fix missing endian conversion of aa_index
authorMichael Bringmann <mwb@linux.vnet.ibm.com>
Mon, 22 May 2017 20:44:37 +0000 (15:44 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jun 2017 11:16:25 +0000 (13:16 +0200)
commit1cfe1e9da629dcf602e307b8f04ebd174536d3b0
tree03dba84078508a859914ff7109539de0b6ac7444
parent8c92870bdbf20b5fa5150a2c8bf53ab498516b24
powerpc/hotplug-mem: Fix missing endian conversion of aa_index

commit dc421b200f91930c9c6a9586810ff8c232cf10fc upstream.

When adding or removing memory, the aa_index (affinity value) for the
memblock must also be converted to match the endianness of the rest
of the 'ibm,dynamic-memory' property.  Otherwise, subsequent retrieval
of the attribute will likely lead to non-existent nodes, followed by
using the default node in the code inappropriately.

Fixes: 5f97b2a0d176 ("powerpc/pseries: Implement memory hotplug add in the kernel")
Signed-off-by: Michael Bringmann <mwb@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/platforms/pseries/hotplug-memory.c