[PATCH] powerpc/numa: Ensure nodes are inited for mem changes

Michael Bringmann mwb at linux.vnet.ibm.com
Wed Nov 28 08:56:23 AEDT 2018


This patch fixes some problems encountered at runtime where changes
to memory affinity changes reference nodes that were not initialized
during system execution after boot.  We are initializing a node
description that may be subsequently used for memory or CPUs before
it can be referenced as invalid.

Signed-off-by: Michael Bringmann <mwb at linux.vnet.ibm.com>
---
 arch/powerpc/mm/numa.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index d9109e0..f3714fa 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -1026,6 +1026,11 @@ int hot_add_scn_to_nid(unsigned long scn_addr)
 			pr_debug("new nid %d for %#010lx\n", nid, scn_addr);
 	}
 
+	if (NODE_DATA(nid) == NULL) {
+		if (try_online_node(nid))
+			nid = first_online_node;
+	}
+
 	return nid;
 }
 



More information about the Linuxppc-dev mailing list