From: Junhao He <hejunhao3@huawei.com>
To: <will@kernel.org>, <linux-kernel@vger.kernel.org>,
<jonathan.cameron@huawei.com>, <mark.rutland@arm.com>
Cc: <linux-arm-kernel@lists.infradead.org>,
<zhangshaokun@hisilicon.com>, <catalin.marinas@arm.com>,
<kernel-team@android.com>, <linuxarm@huawei.com>,
<yangyicong@huawei.com>, <f.fangjian@huawei.com>,
<shenyang39@huawei.com>, <prime.zeng@hisilicon.com>,
<hejunhao3@huawei.com>
Subject: [PATCH 1/3] drivers/perf: hisi: Advertise the PERF_PMU_CAP_NO_EXCLUDE capability
Date: Thu, 19 Jan 2023 18:03:05 +0800 [thread overview]
Message-ID: <20230119100307.3660-2-hejunhao3@huawei.com> (raw)
In-Reply-To: <20230119100307.3660-1-hejunhao3@huawei.com>
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>
---
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
next prev parent reply other threads:[~2023-01-19 10:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-19 10:03 [PATCH 0/3] Setting the pmu::capability and modify some code styles Junhao He
2023-01-19 10:03 ` Junhao He [this message]
2023-01-19 10:03 ` [PATCH 2/3] drivers/perf: hisi: Simplify the parameters of hisi_pmu_init() Junhao He
2023-01-19 10:03 ` [PATCH 3/3] drivers/perf: hisi: Extract initialization of "cpa_pmu->pmu" Junhao He
2023-01-19 19:08 ` [PATCH 0/3] Setting the pmu::capability and modify some code styles Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230119100307.3660-2-hejunhao3@huawei.com \
--to=hejunhao3@huawei.com \
--cc=catalin.marinas@arm.com \
--cc=f.fangjian@huawei.com \
--cc=jonathan.cameron@huawei.com \
--cc=kernel-team@android.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=mark.rutland@arm.com \
--cc=prime.zeng@hisilicon.com \
--cc=shenyang39@huawei.com \
--cc=will@kernel.org \
--cc=yangyicong@huawei.com \
--cc=zhangshaokun@hisilicon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®