]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 1 Jun 2017 09:54:41 +0000 (19:54 +1000)
commitbee0fe824cb7ab088e30d1bf5f0ee58d5ee6a6ed
tree42b0aaed2f592827ab8cb07fd37b6a15c81eacfb
parent069e9ba5184e6d7f1ff0a9d9311e5a52cc7b8fd6
powerpc/hotplug-mem: Fix missing endian conversion of aa_index

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: 3ce500d296b1 ("powerpc/pseries: Implement memory hotplug add in the kernel")
Cc: stable@vger.kernel.org # v4.1+
Signed-off-by: Michael Bringmann <mwb@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/pseries/hotplug-memory.c