Blame SOURCES/0004-Fix-DIMM-info-for-older-IBM-POWER-systems.patch

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