[Skiboot] [PATCH v2 04/11] Device-Tree(DT) entry for DIMM rate

Madhavan Srinivasan maddy at linux.vnet.ibm.com
Tue Jul 21 16:38:44 AEST 2015


Patch creates a DT entry to pass the information about the DIMM
rate to kernel. This is needed to calculate % memory bandwidth
utilisation metrics.

Signed-off-by: Madhavan Srinivasan <maddy at linux.vnet.ibm.com>
---
 hw/nest.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/hw/nest.c b/hw/nest.c
index 1091983514b9..e3b0a4ffca75 100644
--- a/hw/nest.c
+++ b/hw/nest.c
@@ -163,5 +163,24 @@ void nest_pmu_init(int loaded)
 		dt_add_property(chip_dev, "ibm,ima-chip", NULL, 0);
 	}
 
+	/*
+	 * Dimm rate DT Entry. Needed for % utilisation calculation.
+	 */
+	chip = get_chip(this_cpu()->chip_id);
+	switch (chip->type) {
+	case PROC_CHIP_P8_MURANO:
+		dt_add_property_cells(dev,"dimm", MURANO_CENTAUR_DIMM);
+		break;
+	case PROC_CHIP_P8_VENICE:
+		dt_add_property_cells(dev,"dimm", VENICE_CENTAUR_DIMM);
+		break;
+	case PROC_CHIP_P8_NAPLES:
+		dt_add_property_cells(dev,"dimm", VENICE_CENTAUR_DIMM);
+		break;
+	default:
+		prlog(PR_DEBUG,"Nest_IMA: Unknown chip type,skipping dimm file\n");
+		break;
+	}
+
 	return;
 }
-- 
1.9.1



More information about the Skiboot mailing list