Skip to content

Commit 7d52e2c

Browse files
Yicong YangSuzuki K Poulose
authored andcommitted
hwtracing: hisi_ptt: Don't try to attach a task
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@hisilicon.com> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Link: https://lore.kernel.org/r/20231010084731.30450-5-yangyicong@huawei.com
1 parent 7a527d4 commit 7d52e2c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/hwtracing/ptt/hisi_ptt.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,6 +1003,9 @@ static int hisi_ptt_pmu_event_init(struct perf_event *event)
10031003
return -EOPNOTSUPP;
10041004
}
10051005

1006+
if (event->attach_state & PERF_ATTACH_TASK)
1007+
return -EOPNOTSUPP;
1008+
10061009
if (event->attr.type != hisi_ptt->hisi_ptt_pmu.type)
10071010
return -ENOENT;
10081011

0 commit comments

Comments
 (0)