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

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