[Skiboot] [PATCH] hdat/vpd: Add chip-id property to processor chip node under vpd
Vasant Hegde
hegdevasant at linux.vnet.ibm.com
Tue Apr 5 20:39:13 AEST 2016
We have core information under /cpus node and processor chip VPD data
(like SN, LN, etc) under /vpd directory. Presently we don't have any
property to relate cores and chip information. This patch adds chip-id
information for processor chip nodes under vpd.
Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
hdata/spira.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/hdata/spira.c b/hdata/spira.c
index bff6d71..75c8d33 100644
--- a/hdata/spira.c
+++ b/hdata/spira.c
@@ -371,7 +371,7 @@ static bool add_xscom_sppcrd(uint64_t xscom_base)
const struct HDIF_common_hdr *hdif;
unsigned int i, vpd_sz;
const void *vpd;
- struct dt_node *np;
+ struct dt_node *np, *vpd_node;
for_each_ntuple_idx(&spira.ntuples.proc_chip, hdif, i,
SPPCRD_HDIF_SIG) {
@@ -409,7 +409,11 @@ static bool add_xscom_sppcrd(uint64_t xscom_base)
}
/* Add chip VPD */
- dt_add_vpd_node(hdif, SPPCRD_IDATA_FRU_ID, SPPCRD_IDATA_KW_VPD);
+ vpd_node = dt_add_vpd_node(hdif, SPPCRD_IDATA_FRU_ID,
+ SPPCRD_IDATA_KW_VPD);
+ if (vpd_node)
+ dt_add_property_cells(vpd_node, "ibm,chip-id",
+ be32_to_cpu(cinfo->xscom_id));
/* Add module VPD on version A and later */
if (version >= 0x000a) {
@@ -437,7 +441,7 @@ static void add_xscom_sppaca(uint64_t xscom_base)
{
const struct HDIF_common_hdr *hdif;
unsigned int i;
- struct dt_node *np;
+ struct dt_node *np, *vpd_node;
for_each_ntuple_idx(&spira.ntuples.paca, hdif, i, PACA_HDIF_SIG) {
const struct sppaca_cpu_id *id;
@@ -474,7 +478,10 @@ static void add_xscom_sppaca(uint64_t xscom_base)
continue;
/* Add chip VPD */
- dt_add_vpd_node(hdif, SPPACA_IDATA_FRU_ID, SPPACA_IDATA_KW_VPD);
+ vpd_node = dt_add_vpd_node(hdif, SPPACA_IDATA_FRU_ID,
+ SPPACA_IDATA_KW_VPD);
+ if (vpd_node)
+ dt_add_property_cells(vpd_node, "ibm,chip-id", chip_id);
/* Add chip associativity data */
dt_add_property_cells(np, "ibm,ccm-node-id",
More information about the Skiboot
mailing list