Re: [PATCH 1/1] Return EINVAL when precise_ip perf events are requested on Arm

Peter Zijlstra
2020-01-17T14:01:56Z

On Fri, Jan 17, 2020 at 12:39:21PM +0000, Will Deacon wrote:

> Perhaps a better way would be to expose something under sysfs, a bit like
> the caps directory for the SPE PMU, which identifies the fields of the attr
> structure that the driver does not ignore. I think doing this as an Arm-PMU
> specific thing initially would be fine, but it would be even better to have
> something where a driver can tell perf core about the parts it responds to
> and have this stuff populated automatically. The current design makes it
> inevitable that PMU drivers will have issues like the one you point out in
> the cover letter.
>
> Thoughts?

We have PERF_PMU_CAP_ flags we could extend to that purpose.