On 10/10/18 1:37 PM, Aaron Lindsay wrote: > + cpu->pmceid0 = pmceid & 0xffffffff; > + cpu->pmceid1 = (pmceid >> 32) & 0xffffffff;
extract64(pmceid, 0, 32) and extract64(pmceid, 32, 32). > +static const pm_event pm_events[] = { > +}; > +#define MAX_EVENT_ID 0x0 Is this going to be ARRAY_SIZE(pm_events) - 1 in the end? > +static uint16_t supported_event_map[MAX_EVENT_ID + 1]; Better as ARRAY_SIZE(pm_events)? > + for (i = 0; i <= MAX_EVENT_ID; i++) { > + supported_event_map[i] = UNSUPPORTED_EVENT; > + } I think maybe for (i = 0; i < ARRAY_SIZE(supported_map_event); ++i) { would be better. r~