[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230119100307.3660-2-hejunhao3@huawei.com>
Date: Thu, 19 Jan 2023 18:03:05 +0800
From: Junhao He <hejunhao3@...wei.com>
To: <will@...nel.org>, <linux-kernel@...r.kernel.org>,
<jonathan.cameron@...wei.com>, <mark.rutland@....com>
CC: <linux-arm-kernel@...ts.infradead.org>,
<zhangshaokun@...ilicon.com>, <catalin.marinas@....com>,
<kernel-team@...roid.com>, <linuxarm@...wei.com>,
<yangyicong@...wei.com>, <f.fangjian@...wei.com>,
<shenyang39@...wei.com>, <prime.zeng@...ilicon.com>,
<hejunhao3@...wei.com>
Subject: [PATCH 1/3] 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@...wei.com>
---
drivers/perf/hisilicon/hisi_uncore_pmu.c | 1 +
1 file changed, 1 insertion(+)
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);
--
2.33.0
Powered by blists - more mailing lists