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

Will Deacon
2020-01-17T13:05:51Z

> On Wed, Jan 15, 2020 at 10:58:55AM +0000, James Clark wrote:
> > diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c
> > index df352b334ea7..4ddbdb93b3b6 100644
> > --- a/drivers/perf/arm_pmu.c
> > +++ b/drivers/perf/arm_pmu.c
> > @@ -102,6 +102,9 @@ armpmu_map_event(struct perf_event *event,
> > u64 config = event->attr.config;
> > int type = event->attr.type;
> >
> > + if (event->attr.precise)
> > + return -EINVAL;

Also, does this field even exist? Guessing you mean 'precise_ip', but
then that means this hasn't even seen a compiler :(

Will