diff mbox series

memory: Add NUMA associtivity information to DT

Message ID 20191017082630.15154-1-oohall@gmail.com
State Accepted
Headers show
Series memory: Add NUMA associtivity information to DT | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (d75e82dbfbb9443efeb3f9a5921ac23605aab469)
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco success Signed-off-by present

Commit Message

Oliver O'Halloran Oct. 17, 2019, 8:26 a.m. UTC
The ibm,chip-id property is not sufficent for Linux to work out the NUMA
node that a pmem region is placed on. Add any nodes that are compatible
with "pmem-region" to the pass where we add affinity information to the
normal memory@ nodes.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
---
 core/mem_region.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/core/mem_region.c b/core/mem_region.c
index 47d754455e9b..06cef1b2b353 100644
--- a/core/mem_region.c
+++ b/core/mem_region.c
@@ -1068,7 +1068,8 @@  void mem_region_init(void)
 	 * done by add_chip_dev_associativity()
 	 */
 	dt_for_each_node(dt_root, i) {
-		if (!dt_has_node_property(i, "device_type", "memory"))
+		if (!dt_has_node_property(i, "device_type", "memory") &&
+		    !dt_has_node_property(i, "compatible", "pmem-region"))
 			continue;
 
 		/* Add associativity properties */