[PATCH 1/3] arm/pmu: Reject groups spanning multiple hardware PMUs

Peter Zijlstra peterz at infradead.org
Tue Mar 10 06:00:41 PDT 2015

On Tue, Mar 10, 2015 at 01:53:51PM +0100, Peter Zijlstra wrote:
> > It would be nicer if we could prevent this in the core so we're not
> > reliant on every PMU driver doing the same verification. My initial
> > thought was that seemed like unnecessary duplication of the ctx checking
> > above, but if we're going to end up shoving it into several drivers
> > anyway perhaps it's the lesser evil.
> Again, agreed, that would be better and less error prone. But I'm not
> entirely sure how to go about doing it :/ I'll have to go think about
> that; and conferences are not the best place for that.
> Suggestions on that are welcome of course ;)

So the problem is that event_init() is what will return the pmu, so we
cannot make decisions on it until after that returns.

Maybe we can pull out the validate step into its own funciton;
pmu->validate() or whatnot, to be called slightly later.

More information about the linux-arm-kernel mailing list