[Skiboot] [PATCH v5 7/9] Device-Tree entry for max dimm rate

Madhavan Srinivasan maddy at linux.vnet.ibm.com
Thu Sep 3 19:22:34 AEST 2015


Create a device tree entry to pass max dimm rate. This is needed in
% memory bandwidth utilisation metrics calculation.

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

diff --git a/hw/nest.c b/hw/nest.c
index b75a5b3a1efc..03f5e9c952c0 100644
--- a/hw/nest.c
+++ b/hw/nest.c
@@ -434,6 +434,28 @@ void nest_pmu_init(int loaded)
 		 */
 		if (detect_nest_units(chip_dev))
 			goto fail;
+
+		/*
+		 * dimm rate device tree entry. Needed for
+		 * % utilisation calculation.
+		 */
+		switch (chip->type) {
+		case PROC_CHIP_P8_MURANO:
+			dt_add_property_cells(chip_dev,"max-dimm-rate",
+							MURANO_CENTAUR_DIMM);
+			break;
+		case PROC_CHIP_P8_VENICE:
+			dt_add_property_cells(chip_dev,"max-dimm-rate",
+							VENICE_CENTAUR_DIMM);
+			break;
+		case PROC_CHIP_P8_NAPLES:
+			dt_add_property_cells(chip_dev,"max-dimm-rate",
+							VENICE_CENTAUR_DIMM);
+			break;
+		default:
+			prerror("nest-counters: Unknown chip type, skipping dimm file\n");
+			break;
+		}
 	}
 
 	return;
-- 
1.9.1



More information about the Skiboot mailing list