Skip to content

Commit aff787f

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 <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Signed-off-by: Suzuki K Poulose <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent e0dd27a commit aff787f

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
@@ -1000,6 +1000,9 @@ static int hisi_ptt_pmu_event_init(struct perf_event *event)
10001000
return -EOPNOTSUPP;
10011001
}
10021002

1003+
if (event->attach_state & PERF_ATTACH_TASK)
1004+
return -EOPNOTSUPP;
1005+
10031006
if (event->attr.type != hisi_ptt->hisi_ptt_pmu.type)
10041007
return -ENOENT;
10051008

0 commit comments

Comments
 (0)