Re: [PATCH V8 18/23] coresight: etm-perf: new PMU driver for ETM tracers

2016-01-28 Thread Mathieu Poirier
On 28 January 2016 at 08:42, Alexander Shishkin wrote: > Mathieu Poirier writes: > >>> I'd like to understand all the potential failures here, because it's >>> really a good idea to keep those to a minimum for the sake of >>> consistency. That is, if the user succeeded in creating an event, about

Re: [PATCH V8 18/23] coresight: etm-perf: new PMU driver for ETM tracers

2016-01-28 Thread Alexander Shishkin
Mathieu Poirier writes: >> I'd like to understand all the potential failures here, because it's >> really a good idea to keep those to a minimum for the sake of >> consistency. That is, if the user succeeded in creating an event, about >> the only good reason for the event not starting is a fille

Re: [PATCH V8 18/23] coresight: etm-perf: new PMU driver for ETM tracers

2016-01-27 Thread Mathieu Poirier
On 26 January 2016 at 08:27, Alexander Shishkin wrote: > Mathieu Poirier writes: > >> +static int etm_event_init(struct perf_event *event) >> +{ >> + if (event->attr.type != etm_pmu.type) >> + return -ENOENT; >> + >> + if (event->cpu >= nr_cpu_ids) >> + return -EIN

Re: [PATCH V8 18/23] coresight: etm-perf: new PMU driver for ETM tracers

2016-01-26 Thread Alexander Shishkin
Mathieu Poirier writes: > +static int etm_event_init(struct perf_event *event) > +{ > + if (event->attr.type != etm_pmu.type) > + return -ENOENT; > + > + if (event->cpu >= nr_cpu_ids) > + return -EINVAL; perf_event_alloc() already does this. Except for this one do