Message ID | 1436115333-18657-5-git-send-email-maddy@linux.vnet.ibm.com |
---|---|
State | Changes Requested |
Headers | show |
On Sun, 2015-07-05 at 22:25 +0530, Madhavan Srinivasan wrote: > diff --git a/hw/nest.c b/hw/nest.c > index 7b13512..1798351 100644 > --- a/hw/nest.c > +++ b/hw/nest.c > @@ -148,5 +148,21 @@ void nest_ima_init(void) > dt_add_property_cells(chip_dev, "size", SLW_IMA_SIZE); > dt_add_property(chip_dev, "ibm,ima-chip", NULL, 0); > } > + > + /* > + * Dimm rate DT Entry. Needed for % utilisation calculation. > + */ > + chip = get_chip(pir_to_chip_id(this_cpu()->pir)); 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; > + default: Print a warning? How about naples? > + break; > + } > + > return; > }
On Thursday 16 July 2015 07:26 AM, Joel Stanley wrote: > On Sun, 2015-07-05 at 22:25 +0530, Madhavan Srinivasan wrote: >> diff --git a/hw/nest.c b/hw/nest.c >> index 7b13512..1798351 100644 >> --- a/hw/nest.c >> +++ b/hw/nest.c >> @@ -148,5 +148,21 @@ void nest_ima_init(void) >> dt_add_property_cells(chip_dev, "size", SLW_IMA_SIZE); >> dt_add_property(chip_dev, "ibm,ima-chip", NULL, 0); >> } >> + >> + /* >> + * Dimm rate DT Entry. Needed for % utilisation calculation. >> + */ >> + chip = get_chip(pir_to_chip_id(this_cpu()->pir)); > get_chip(this_cpu()->chip_id) Yes. Will change it. > >> + 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; >> + default: > Print a warning? Yes. Make sense. Will add a warning > How about naples? Yes. Right. Will add it. Nice catch. Thanks >> + break; >> + } >> + >> return; >> } >
diff --git a/hw/nest.c b/hw/nest.c index 7b13512..1798351 100644 --- a/hw/nest.c +++ b/hw/nest.c @@ -148,5 +148,21 @@ void nest_ima_init(void) dt_add_property_cells(chip_dev, "size", SLW_IMA_SIZE); dt_add_property(chip_dev, "ibm,ima-chip", NULL, 0); } + + /* + * Dimm rate DT Entry. Needed for % utilisation calculation. + */ + chip = get_chip(pir_to_chip_id(this_cpu()->pir)); + 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; + default: + break; + } + return; }
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@linux.vnet.ibm.com> --- hw/nest.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)