linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/numa: Ensure nodes are inited for mem changes
@ 2018-11-27 21:56 Michael Bringmann
  0 siblings, 0 replies; only message in thread
From: Michael Bringmann @ 2018-11-27 21:56 UTC (permalink / raw)
  To: linuxppc-dev, mwb
  Cc: Juliet Kim, Thomas Falcon, Tyrel Datwyler, Srikar Dronamraju

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@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;
 }
 


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-11-27 21:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-27 21:56 [PATCH] powerpc/numa: Ensure nodes are inited for mem changes Michael Bringmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).