Commit 15c7ef73 authored by Ilkka Koskinen's avatar Ilkka Koskinen Committed by Catalin Marinas

perf: arm_cspmu: Reject events meant for other PMUs

Coresight PMU driver didn't reject events meant for other PMUs.
This caused some of the Core PMU events disappearing from
the output of "perf list". In addition, trying to run e.g.

     $ perf stat -e r2 sleep 1

made Coresight PMU driver to handle the event instead of letting
Core PMU driver to deal with it.

Cc: stable@vger.kernel.org
Fixes: e37dfd65 ("perf: arm_cspmu: Add support for ARM CoreSight PMU driver")
Signed-off-by: default avatarIlkka Koskinen <ilkka@os.amperecomputing.com>
Acked-by: default avatarWill Deacon <will@kernel.org>
Reviewed-by: default avatarBesar Wicaksono <bwicaksono@nvidia.com>
Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
Reviewed-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
Link: https://lore.kernel.org/r/20231103001654.35565-1-ilkka@os.amperecomputing.comSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 6eeeb4c7
......@@ -676,6 +676,9 @@ static int arm_cspmu_event_init(struct perf_event *event)
cspmu = to_arm_cspmu(event->pmu);
if (event->attr.type != event->pmu->type)
return -ENOENT;
/*
* Following other "uncore" PMUs, we do not support sampling mode or
* attach to a task (per-process mode).
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment