From 5c69f583963c01afefeff967416ea79fbfafd1f6 Mon Sep 17 00:00:00 2001 From: Dan Callaghan Date: Wed, 11 Jul 2018 13:34:55 +1000 Subject: [PATCH 4/8] 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 642b3c54ece1..23ef797788cb 100644 --- a/src/core/device-tree.cc +++ b/src/core/device-tree.cc @@ -1395,7 +1395,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"); @@ -1448,12 +1447,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