]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf/arm_cspmu: Generalise event filtering
authorRobin Murphy <robin.murphy@arm.com>
Wed, 5 Mar 2025 16:10:07 +0000 (16:10 +0000)
committerWill Deacon <will@kernel.org>
Thu, 13 Mar 2025 21:35:04 +0000 (21:35 +0000)
commit6de0298a3925f1e6e313430c45ae314a93f89ef6
tree3530cb7b1ba4ca89fa92999d217a60202ff2b643
parent862f7ad4d7fdf5e8d7ff11ad8eda5af3ad44cdae
perf/arm_cspmu: Generalise event filtering

The notion of a single u32 filter value for any event doesn't scale well
when the potential architectural scope is already two 64-bit values, and
implementations may add custom stuff on the side too. Rather than try to
thread arbitrary filter data through the common path, let's just make
the set_ev_filter op self-contained in terms of parsing and configuring
any and all filtering for the given event - splitting out a distinct op
for cycles events which inherently differ - and let implementations
override the whole thing if they want to do something different. This
already allows the Ampere code to stop looking a bit hacky.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: James Clark <james.clark@linaro.org>
Reviewed-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
Link: https://lore.kernel.org/r/c0cd4d4c12566dbf1b062ccd60241b3e0639f4cc.1741190362.git.robin.murphy@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/arm_cspmu/ampere_cspmu.c
drivers/perf/arm_cspmu/arm_cspmu.c
drivers/perf/arm_cspmu/arm_cspmu.h
drivers/perf/arm_cspmu/nvidia_cspmu.c