mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-28 13:22:57 +00:00
hwtracing: hisi_ptt: Don't try to attach a task
[ Upstream commit aff787f64a
]
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
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
2e3fc2a45a
commit
63360763bf
1 changed files with 3 additions and 0 deletions
|
@ -659,6 +659,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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue