[Skiboot] [PATCH v4 7/9] Device-Tree entry for dimm rate
Madhavan Srinivasan
maddy at linux.vnet.ibm.com
Mon Aug 17 03:19:25 AEST 2015
Create a device tree entry to pass 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 | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/hw/nest.c b/hw/nest.c
index fa45902c17ef..a45bbae8fe81 100644
--- a/hw/nest.c
+++ b/hw/nest.c
@@ -399,6 +399,25 @@ void nest_pmu_init(int loaded)
if (detect_nest_units(dev))
goto fail;
+ /*
+ * dimm rate device tree 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,"max-dimm-rate", MURANO_CENTAUR_DIMM);
+ break;
+ case PROC_CHIP_P8_VENICE:
+ dt_add_property_cells(dev,"max-dimm-rate", VENICE_CENTAUR_DIMM);
+ break;
+ case PROC_CHIP_P8_NAPLES:
+ dt_add_property_cells(dev,"max-dimm-rate", VENICE_CENTAUR_DIMM);
+ break;
+ default:
+ prerror("nest-counters: Unknown chip type,skipping dimm file\n");
+ break;
+ }
+
return;
fail:
--
1.9.1
More information about the Skiboot
mailing list