[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231211135147.380223-2-sashal@kernel.org>
Date: Mon, 11 Dec 2023 08:50:03 -0500
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Yicong Yang <yangyicong@...ilicon.com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Suzuki K Poulose <suzuki.poulose@....com>,
Sasha Levin <sashal@...nel.org>, jonathan.cameron@...wei.com,
alexander.shishkin@...ux.intel.com
Subject: [PATCH AUTOSEL 6.6 02/47] hwtracing: hisi_ptt: Don't try to attach a task
From: Yicong Yang <yangyicong@...ilicon.com>
[ Upstream commit aff787f64ad7cbb54614b51b82c682fe06411ef3 ]
PTT is an uncore PMU and shouldn't be attached to any task. Block
the usage in pmu::event_init().
Signed-off-by: Yicong Yang <yangyicong@...ilicon.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@....com>
Link: https://lore.kernel.org/r/20231010084731.30450-5-yangyicong@huawei.com
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/hwtracing/ptt/hisi_ptt.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/hwtracing/ptt/hisi_ptt.c b/drivers/hwtracing/ptt/hisi_ptt.c
index 7d2127d86c728..1d066ce8358f0 100644
--- a/drivers/hwtracing/ptt/hisi_ptt.c
+++ b/drivers/hwtracing/ptt/hisi_ptt.c
@@ -1000,6 +1000,9 @@ static int hisi_ptt_pmu_event_init(struct perf_event *event)
return -EOPNOTSUPP;
}
+ if (event->attach_state & PERF_ATTACH_TASK)
+ return -EOPNOTSUPP;
+
if (event->attr.type != hisi_ptt->hisi_ptt_pmu.type)
return -ENOENT;
--
2.42.0
Powered by blists - more mailing lists