From 35b4524d85843fa60e9f10133cfdb1c75cbb6c02 Mon Sep 17 00:00:00 2001
From: Dan Callaghan <dcallagh@redhat.com>
Date: Wed, 11 Jul 2018 13:34:55 +1000
Subject: [PATCH 07/10] Fix DIMM info for older IBM POWER systems
Commit f95aa917 applied the patch from #695, adding the
scan_devtree_memory_ibm() function, but it called the function in the
wrong place. The function finds memory-controller@* nodes on older IBM
POWER systems, not newer OPAL firmware based ones.
This patch has the side effect of reordering CPU nodes before memory
nodes on non-IBM device-tree-based hardware (like Calxeda Highbank and
other unusual stuff). That is in line with other platforms.
---
src/core/device-tree.cc | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/core/device-tree.cc b/src/core/device-tree.cc
index 7903622..dea4140 100644
--- a/src/core/device-tree.cc
+++ b/src/core/device-tree.cc
@@ -1396,7 +1396,6 @@ bool scan_device_tree(hwNode & n)
core->addHint("icon", string("board"));
scan_devtree_root(*core);
scan_devtree_cpu_power(*core);
- scan_devtree_memory_ibm(*core);
scan_devtree_memory_powernv(*core);
scan_devtree_firmware_powernv(*core);
n.addCapability("powernv", "Non-virtualized");
@@ -1449,12 +1448,12 @@ bool scan_device_tree(hwNode & n)
if (exists(DEVICETREE "/ibm,lpar-capable")) {
n.setDescription("pSeries LPAR");
scan_devtree_cpu_power(*core);
- scan_devtree_memory(*core);
}
else {
- scan_devtree_memory(*core);
scan_devtree_cpu(*core);
- }
+ }
+ scan_devtree_memory(*core);
+ scan_devtree_memory_ibm(*core);
}
}
--
2.17.1