lshw/0010-devtree-Add-chip-id-from-the-dimm-module.patch

40 lines
1.3 KiB
Diff
Raw Permalink Normal View History

From 4c19563dae05d3a730bb67917f1810eb33a54613 Mon Sep 17 00:00:00 2001
From: Shivaprasad G Bhat <sbhat@linux.ibm.com>
Date: Fri, 6 Mar 2020 04:41:33 -0600
Subject: [PATCH 10/17] devtree: Add chip-id from the dimm module
Add chip-id from dimm module into the configuration if available. DIMM's are
behind the CHIP on Power systems. By adding chip-id it helps to map what dimm
is sitting behind which chip.
Sample output:
*-bank:0
description: 16GB CDIMM
product: 41T9571 FRU# 41T9571
physical id: 0
.....
configuration: chip-id=0
Signed-off-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
---
src/core/device-tree.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/core/device-tree.cc b/src/core/device-tree.cc
index 490e1976e619..f43d34f072b6 100644
--- a/src/core/device-tree.cc
+++ b/src/core/device-tree.cc
@@ -1031,6 +1031,8 @@ static void add_memory_bank(string name, string path, hwNode & core)
if(exists("description"))
description = hw::strip(get_string("description"));
bank.setDescription(description);
+ if (exists("ibm,chip-id"))
+ bank.setConfig("chip-id", get_u32("ibm,chip-id"));
if(exists("ibm,loc-code"))
bank.setSlot(hw::strip(get_string("ibm,loc-code")));
--
2.17.1