Re: [PATCH 1/3] arm/pmu: Reject groups spanning multiple hardware PMUs
From: Peter Zijlstra
Date: Tue Mar 10 2015 - 09:00:57 EST
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.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/