[Skiboot] [RESEND PATCH v1 09/11]ibm-fsp/firenze: Nest Xlink unit support
Madhavan Srinivasan
maddy at linux.vnet.ibm.com
Thu Jul 16 13:50:45 AEST 2015
On Thursday 16 July 2015 07:23 AM, Joel Stanley wrote:
> On Sun, 2015-07-05 at 22:25 +0530, Madhavan Srinivasan wrote:
>> Patch adds support for Nest Xlink unit. In tuleta, X links connects
>> the Chips within the DCM. Xlink counter data should give inter chip bandwidth
>> usage (with in socket).
>>
>> Signed-off-by: Madhavan Srinivasan <maddy at linux.vnet.ibm.com>
>> ---
>> hw/nest.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++--
>> include/nest.h | 3 +++
>> 2 files changed, 53 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/nest.c b/hw/nest.c
>> index df93601..fc83589 100644
>> --- a/hw/nest.c
>> +++ b/hw/nest.c
>> @@ -194,6 +194,51 @@ int dt_create_ima_chip_alink_type( struct dt_node *ima,
>> return 0;
>> }
>>
>> +int dt_create_ima_chip_xlink_event(struct dt_node *ima,
>> + int idx, u32 offset)
>> +{
>> + char ev_name[MAX_NAME_SIZE];
>> + const char *unit = "MiB", *scale = "7.629e-6";
>> +
>> + memset((void *)ev_name, '\0', MAX_NAME_SIZE);
>> + snprintf(ev_name, MAX_NAME_SIZE, "Xlink%d", idx);
> See comments I made in patch 8 about merging these similar functions.
Sure, will remove the memset and also would prefer to have
separate functions for nest units since scale, unit names differ.
But will look into these again.
Thanks for review comments
Maddy
>
>> + dt_add_property_cells(ima, ev_name, offset);
>> +
>> + /* Unit for the Event */
>> + memset((void *)ev_name, '\0', MAX_NAME_SIZE);
>> + snprintf(ev_name, MAX_NAME_SIZE, "unit.Xlink%d.unit", idx);
>> + dt_add_property_string(ima, ev_name, unit);
>> +
>> + /* Scale for the Event */
>> + memset((void *)ev_name, '\0', MAX_NAME_SIZE);
>> + snprintf(ev_name, MAX_NAME_SIZE, "scale.Xlink%d.scale", idx);
>> + dt_add_property_string(ima, ev_name, scale);
>> +
>> + return 0;
>> +}
>
More information about the Skiboot
mailing list