lshw/0012-devtree-Add-chip-id-from-the-dimm-module.patch
Tao Liu 590477acba Update lshw to upstream latest(a2b731e7ecf)
Resolves: bz2032177

Signed-off-by: Tao Liu <ltao@redhat.com>
2021-12-24 11:30:57 +08:00

40 lines
1.3 KiB
Diff

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 12/65] 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 490e197..f43d34f 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.33.1