Commit aff787f6 authored by Yicong Yang's avatar Yicong Yang Committed by Suzuki K Poulose

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: default avatarYicong Yang <yangyicong@hisilicon.com>
Acked-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20231010084731.30450-5-yangyicong@huawei.com
parent e0dd27ad
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment