summaryrefslogtreecommitdiff
path: root/drivers/perf/hisilicon
diff options
context:
space:
mode:
authorJunhao He <hejunhao3@huawei.com>2023-01-19 13:03:05 +0300
committerWill Deacon <will@kernel.org>2023-01-19 21:30:20 +0300
commit7f95da9d2dc4c20bb374c281ceb8fa40b6208f4b (patch)
tree9f03dc69eabc1bd00d1b07f99b63cb8c087d1d88 /drivers/perf/hisilicon
parentb7bfaa761d760e72a969d116517eaa12e404c262 (diff)
downloadlinux-7f95da9d2dc4c20bb374c281ceb8fa40b6208f4b.tar.xz
drivers/perf: hisi: Advertise the PERF_PMU_CAP_NO_EXCLUDE capability
Missed initialization the variable of pmu::capabilities when extract the initialization code of hisi_pmu->pmu into a function. HISI UNCORE PMU drivers counters that not support context exclusion. So we have to advertise the PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Signed-off-by: Junhao He <hejunhao3@huawei.com> Link: https://lore.kernel.org/r/20230119100307.3660-2-hejunhao3@huawei.com Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'drivers/perf/hisilicon')
-rw-r--r--drivers/perf/hisilicon/hisi_uncore_pmu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/perf/hisilicon/hisi_uncore_pmu.c b/drivers/perf/hisilicon/hisi_uncore_pmu.c
index fbc8a93d5eac..2a466477920b 100644
--- a/drivers/perf/hisilicon/hisi_uncore_pmu.c
+++ b/drivers/perf/hisilicon/hisi_uncore_pmu.c
@@ -546,6 +546,7 @@ void hisi_pmu_init(struct pmu *pmu, const char *name,
pmu->stop = hisi_uncore_pmu_stop;
pmu->read = hisi_uncore_pmu_read;
pmu->attr_groups = attr_groups;
+ pmu->capabilities = PERF_PMU_CAP_NO_EXCLUDE;
}
EXPORT_SYMBOL_GPL(hisi_pmu_init);