OSDN Git Service

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 13:06:03 +0000 (15:06 +0200)
commitcbf687acc1e132bece665bc284d9abd32f1bdc11
treea8af7181f7a13d62a993c672c8d810f43a17cd5d
parentb4624ff952ec7d268a9651cd9184a1995befc271
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