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 <bwicaksono@nvidia.com>
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Noah Wager <noah.wager@canonical.com>
Acked-by: Jacob Martin <jacob.martin@canonical.com>
Signed-off-by: Noah Wager <noah.wager@canonical.com>
This commit is contained in:
Besar Wicaksono
2023-11-07 13:21:12 -06:00
committed by Noah Wager
parent 20ff1269e0
commit d54415d9f3
+1 -1
View File
@@ -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;