From: Yushan Wang <wangyushan12@huawei.com>
To: <will@kernel.org>, <mark.rutland@arm.com>, <robin.murphy@arm.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Cc: <fanghao11@huawei.com>, <linuxarm@huawei.com>,
<liuyonglong@huawei.com>, <prime.zeng@hisilicon.com>,
<wangzhou1@hisilicon.com>, <wangyushan12@huawei.com>
Subject: [PATCH v2 1/3] drivers/perf: hisi: Replace counter number with defined macro
Date: Fri, 12 Jun 2026 17:32:05 +0800 [thread overview]
Message-ID: <20260612093207.1242000-2-wangyushan12@huawei.com> (raw)
In-Reply-To: <20260612093207.1242000-1-wangyushan12@huawei.com>
The inline number means counter numbers of the PMU. Replace it with
already define macro for better readability.
Signed-off-by: Yushan Wang <wangyushan12@huawei.com>
---
drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c b/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c
index f963e4f9e552..59e6dff4032f 100644
--- a/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c
+++ b/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c
@@ -362,7 +362,7 @@ static int hisi_l3c_pmu_check_filter(struct perf_event *event)
*/
static u32 hisi_l3c_pmu_get_counter_offset(int cntr_idx)
{
- return L3C_CNTR0_LOWER + L3C_HW_IDX(cntr_idx) * 8;
+ return L3C_CNTR0_LOWER + L3C_HW_IDX(cntr_idx) * L3C_NR_COUNTERS;
}
static u64 hisi_l3c_pmu_read_counter(struct hisi_pmu *l3c_pmu,
--
2.33.0
next prev parent reply other threads:[~2026-06-12 9:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-12 9:32 [PATCH v2 0/3] drivers/perf: hisi: Updates for HiSilicon uncore PMUs Yushan Wang
2026-06-12 9:32 ` Yushan Wang [this message]
2026-06-12 9:32 ` [PATCH v2 2/3] drivers/perf: hisi: Support uncore ITS PMU Yushan Wang
2026-06-12 9:32 ` [PATCH v2 3/3] drivers/perf: hisi: Add new function for HiSilicon MN PMU driver Yushan Wang
2026-06-12 9:35 ` [PATCH v2 0/3] drivers/perf: hisi: Updates for HiSilicon uncore PMUs Yushan Wang
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=20260612093207.1242000-2-wangyushan12@huawei.com \
--to=wangyushan12@huawei.com \
--cc=fanghao11@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=liuyonglong@huawei.com \
--cc=mark.rutland@arm.com \
--cc=prime.zeng@hisilicon.com \
--cc=robin.murphy@arm.com \
--cc=wangzhou1@hisilicon.com \
--cc=will@kernel.org \
/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®