Blame SOURCES/0001-devtree-Check-status-property-for-caches.patch

bd7bb7
From ec4dcbf19646e52389c72d85daf20b4e74dc0f92 Mon Sep 17 00:00:00 2001
bd7bb7
From: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
bd7bb7
Date: Tue, 22 Aug 2017 20:53:41 +0530
bd7bb7
Subject: [PATCH 1/5] devtree: Check status property for caches
bd7bb7
bd7bb7
Check status property for L1 cache before enabling cache node.
bd7bb7
Also check status before enabling L2/L3 icache.
bd7bb7
bd7bb7
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
bd7bb7
---
bd7bb7
 src/core/device-tree.cc | 9 +++++++++
bd7bb7
 1 file changed, 9 insertions(+)
bd7bb7
bd7bb7
diff --git a/src/core/device-tree.cc b/src/core/device-tree.cc
bd7bb7
index 05b5b3c..e14a3b3 100644
bd7bb7
--- a/src/core/device-tree.cc
bd7bb7
+++ b/src/core/device-tree.cc
bd7bb7
@@ -670,7 +670,10 @@ static void scan_devtree_cpu_power(hwNode & core)
bd7bb7
     product = hw::strip(get_string(basepath + "/name"));
bd7bb7
 
bd7bb7
     if (hw::strip(get_string(basepath + "/status")) != "okay")
bd7bb7
+    {
bd7bb7
       cache.disable();
bd7bb7
+      icache.disable();
bd7bb7
+    }
bd7bb7
 
bd7bb7
     if (product == "l2-cache")
bd7bb7
       fill_cache_info("L2 Cache", basepath, cache, icache);
bd7bb7
@@ -773,6 +776,12 @@ static void scan_devtree_cpu_power(hwNode & core)
bd7bb7
 
bd7bb7
       if (cache.getSize() > 0)
bd7bb7
         cpu.addChild(cache);
bd7bb7
+
bd7bb7
+      if (hw::strip(get_string(basepath + "/status")) != "okay")
bd7bb7
+      {
bd7bb7
+        cache.disable();
bd7bb7
+        icache.disable();
bd7bb7
+      }
bd7bb7
     }
bd7bb7
 
bd7bb7
     if (exists(basepath + "/l2-cache"))
bd7bb7
-- 
bd7bb7
1.8.3.1
bd7bb7