[PATCH] perf/arm_smmuv3: Omit the two judgements which done in framework
Will Deacon
will at kernel.org
Fri Feb 9 08:09:06 PST 2024
On Thu, Dec 21, 2023 at 05:38:01PM +0800, JiaLong.Yang wrote:
> 'event->attr.type != event->pmu->type' has been done in
> core.c::perf_init_event() ,core.c::perf_event_modify_attr(), etc.
>
> This PMU is an uncore one. The core framework has disallowed
> uncore-task events. So the judgement to event->cpu < 0 is no mean.
It would be great to refer to the changes which added those checks to
the perf core code. From reading the code myself, I can't convince myself
that perf_try_init_event() won't call into the driver.
>
> The two judgements have been done in kernel/events/core.c
>
> Signed-off-by: JiaLong.Yang <jialong.yang at shingroup.cn>
> ---
> drivers/perf/arm_smmuv3_pmu.c | 8 --------
> 1 file changed, 8 deletions(-)
It looks like _many_ perf drivers have these checks, so if they really
aren't needed, we can clean this up bveyond SMMU. However, as I said
above, I'm not quite convinced we can drop them.
Will
More information about the linux-arm-kernel
mailing list