From d54415d9f3fea5501dcec809b3db1716b2b4f54b Mon Sep 17 00:00:00 2001 From: Besar Wicaksono Date: Tue, 7 Nov 2023 13:21:12 -0600 Subject: [PATCH] NVIDIA: SAUCE: perf: arm_cspmu: nvidia: change event filter as optional User is no longer required to specify event filter and driver will use a default value. For example on devices with traffice source/destination filter, the default value can be to specify all sources and destinations. Signed-off-by: Besar Wicaksono Signed-off-by: Laxman Dewangan Acked-by: Noah Wager Acked-by: Jacob Martin Signed-off-by: Noah Wager --- drivers/perf/arm_cspmu/nvidia_cspmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/perf/arm_cspmu/nvidia_cspmu.c b/drivers/perf/arm_cspmu/nvidia_cspmu.c index 213afb7f2702..71803564c72f 100644 --- a/drivers/perf/arm_cspmu/nvidia_cspmu.c +++ b/drivers/perf/arm_cspmu/nvidia_cspmu.c @@ -240,7 +240,7 @@ static u32 nv_cspmu_event_filter(const struct perf_event *event) const struct nv_cspmu_ctx *ctx = to_nv_cspmu_ctx(to_arm_cspmu(event->pmu)); - if (ctx->filter_mask == 0) + if (ctx->filter_mask == 0 || event->attr.config1 == 0) return ctx->filter_default_val; return event->attr.config1 & ctx->filter_mask;