[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231221093802.20612-1-jialong.yang@shingroup.cn>
Date: Thu, 21 Dec 2023 17:38:01 +0800
From: "JiaLong.Yang" <jialong.yang@...ngroup.cn>
To: Will Deacon <will@...nel.org>,
Mark Rutland <mark.rutland@....com>
Cc: shenghui.qu@...ngroup.cn,
ke.zhao@...ngroup.cn,
zhijie.ren@...ngroup.cn,
"JiaLong.Yang" <jialong.yang@...ngroup.cn>,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] perf/arm_smmuv3: Omit the two judgements which done in framework
'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.
The two judgements have been done in kernel/events/core.c
Signed-off-by: JiaLong.Yang <jialong.yang@...ngroup.cn>
---
drivers/perf/arm_smmuv3_pmu.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf/arm_smmuv3_pmu.c
index 6303b82566f9..8ea4a3227165 100644
--- a/drivers/perf/arm_smmuv3_pmu.c
+++ b/drivers/perf/arm_smmuv3_pmu.c
@@ -401,19 +401,11 @@ static int smmu_pmu_event_init(struct perf_event *event)
int group_num_events = 1;
u16 event_id;
- if (event->attr.type != event->pmu->type)
- return -ENOENT;
-
if (hwc->sample_period) {
dev_dbg(dev, "Sampling not supported\n");
return -EOPNOTSUPP;
}
- if (event->cpu < 0) {
- dev_dbg(dev, "Per-task mode not supported\n");
- return -EOPNOTSUPP;
- }
-
/* Verify specified event is supported on this PMU */
event_id = get_event(event);
if (event_id < SMMU_PMCG_ARCH_MAX_EVENTS &&
--
2.25.1
Powered by blists - more mailing lists