Re: [PATCH v5 4/7] powerpc/powernv: detect supported nest pmus and its events

2015-07-23 Thread Madhavan Srinivasan
On Thursday 23 July 2015 02:41 PM, Michael Ellerman wrote: > On Thu, 2015-07-23 at 11:33 +0530, Madhavan Srinivasan wrote: >> On Wednesday 22 July 2015 09:37 AM, Daniel Axtens wrote: >>> static struct perchip_nest_info p8_nest_perchip_info[P8_NEST_MAX_CHIPS]; +static struct nest_pmu

Re: [PATCH v5 4/7] powerpc/powernv: detect supported nest pmus and its events

2015-07-23 Thread Michael Ellerman
On Thu, 2015-07-23 at 11:33 +0530, Madhavan Srinivasan wrote: > > On Wednesday 22 July 2015 09:37 AM, Daniel Axtens wrote: > > > >> static struct perchip_nest_info p8_nest_perchip_info[P8_NEST_MAX_CHIPS]; > >> +static struct nest_pmu *per_nest_pmu_arr[P8_NEST_MAX_PMUS]; > >> + > >> +static int

Re: [PATCH v5 4/7] powerpc/powernv: detect supported nest pmus and its events

2015-07-22 Thread Madhavan Srinivasan
On Wednesday 22 July 2015 09:37 AM, Daniel Axtens wrote: > >> static struct perchip_nest_info p8_nest_perchip_info[P8_NEST_MAX_CHIPS]; >> +static struct nest_pmu *per_nest_pmu_arr[P8_NEST_MAX_PMUS]; >> + >> +static int nest_event_info(struct property *pp, char *name, >> +st

Re: [PATCH v5 4/7] powerpc/powernv: detect supported nest pmus and its events

2015-07-21 Thread Daniel Axtens
> static struct perchip_nest_info p8_nest_perchip_info[P8_NEST_MAX_CHIPS]; > +static struct nest_pmu *per_nest_pmu_arr[P8_NEST_MAX_PMUS]; > + > +static int nest_event_info(struct property *pp, char *name, > + struct nest_ima_events *p8_events, int string, u32 val) 'int string

[PATCH v5 4/7] powerpc/powernv: detect supported nest pmus and its events

2015-07-16 Thread Madhavan Srinivasan
Parse device tree to detect supported nest pmu units. Traverse through each nest pmu unit folder to find supported events and corresponding unit/scale files (if any). The nest unit event file from DT, will contain the offset in the reserved memory region to get the counter data for a given event.