提交 7a801b8e 编写于 作者: J John Garry 提交者: Zhong Jinghua

perf pmu: Check .is_uncore field in pmu_add_cpu_aliases_map()

mainline inclusion
from mainline-v5.15-rc1
commit 5806099a
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I63VF5
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5806099a2e2ab36fa7a7705faaf3d7296b701e67

--------------------------------------------------------------------------

Calling pmu_is_uncore() for fake PMUs does not work, as it checks sysfs
for the PMU details (which won't exist).

Check .is_uncore field instead, which makes sense anyway.
Signed-off-by: NJohn Garry <john.garry@huawei.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linuxarm@huawei.com
Link: https //lore.kernel.org/r/1627566986-30605-7-git-send-email-john.garry@huawei.com
Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: NJunhao He <hejunhao3@huawei.com>
上级 f95b731b
......@@ -831,8 +831,7 @@ void pmu_add_cpu_aliases_map(struct list_head *head, struct perf_pmu *pmu,
break;
}
if (pmu_is_uncore(name) &&
pmu_uncore_alias_match(pname, name))
if (pmu->is_uncore && pmu_uncore_alias_match(pname, name))
goto new_alias;
if (strcmp(pname, name))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册