From: Sandipan Das <sandipan.das@amd.com>
To: Qi Liu <liuqi@hygon.cn>
Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
lijing@hygon.cn, peterz@infradead.org, mingo@redhat.com,
namhyung@kernel.org, alexander.shishkin@linux.intel.com,
jolsa@kernel.org, x86@kernel.org
Subject: Re: [PATCH v2 0/3] perf/x86/amd/uncore: Add common helpers and Hygon support
Date: Fri, 3 Jul 2026 14:11:58 +0530 [thread overview]
Message-ID: <44959c7f-fedd-413e-bb2f-07f97142aef8@amd.com> (raw)
In-Reply-To: <20260701093417.1312443-1-liuqi@hygon.cn>
On 01-07-2026 15:04, Qi Liu wrote:
> This series adds initial Hygon uncore PMU support.
>
> Hygon uncore PMUs use a programming model close to the AMD uncore PMU,
> so this series factors out a small set of common helpers for perf event
> handling, counter assignment and per-CPU context management.
>
> The Hygon-specific support is kept in the Hygon driver. This series
> supports the Hygon DF and DF IOD PMUs. No Hygon-specific logic is
> added to the AMD driver.
>
> Changes since RFC:
> - Address sashiko bot review.
> Changes since v1:
> - Rename the helper namespace to amd_uncore_common_* to avoid
> an generic uncore_common_* prefix, and to keep it distinct
> from the existing amd_uncore_* names.
>
>
> Qi Liu (3):
> perf/x86/amd/uncore: Add common PMU helper functions
> perf/x86/amd/uncore: Convert AMD driver to common PMU helpers
> perf/x86/amd/uncore: Add Hygon uncore PMU support
>
> arch/x86/events/Kconfig | 17 +
> arch/x86/events/amd/Makefile | 4 +
> arch/x86/events/amd/amd_uncore_common.c | 403 +++++++++++++++++
> arch/x86/events/amd/amd_uncore_common.h | 114 +++++
> arch/x86/events/amd/hygon_uncore.c | 556 +++++++++++++++++++++++
> arch/x86/events/amd/uncore.c | 578 +++---------------------
> arch/x86/include/asm/msr-index.h | 2 +
> arch/x86/include/asm/perf_event.h | 20 +
> include/linux/cpuhotplug.h | 3 +
> 9 files changed, 1192 insertions(+), 505 deletions(-)
> create mode 100644 arch/x86/events/amd/amd_uncore_common.c
> create mode 100644 arch/x86/events/amd/amd_uncore_common.h
> create mode 100644 arch/x86/events/amd/hygon_uncore.c
>
I am trying to understand if the code movement is necessary.
Wouldn't it be sufficient to just add the following?
- new UNCORE_TYPE_HYGON_DF and UNCORE_TYPE_HYGON_DF_IOD types
- Hygon-specific attr_groups, pmu->event_init(), pmu->add(),
amd_uncore->init() and amd_uncore->scan() implementations
Using new PMU names will also require tools-side changes. Additionally,
to make the PMUs actually useful, new JSON events and metrics need to
be added. Are there plans for that?
prev parent reply other threads:[~2026-07-03 8:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 9:34 [PATCH v2 0/3] perf/x86/amd/uncore: Add common helpers and Hygon support Qi Liu
2026-07-01 9:34 ` [PATCH v2 1/3] perf/x86/amd/uncore: Add common PMU helper functions Qi Liu
2026-07-01 9:34 ` [PATCH v2 2/3] perf/x86/amd/uncore: Convert AMD driver to common PMU helpers Qi Liu
2026-07-01 9:34 ` [PATCH v2 3/3] perf/x86/amd/uncore: Add Hygon uncore PMU support Qi Liu
2026-07-01 9:48 ` sashiko-bot
2026-07-02 2:36 ` [PATCH v2 0/3] perf/x86/amd/uncore: Add common helpers and Hygon support Borislav Petkov
2026-07-06 11:45 ` 答复: " Qi Liu
2026-07-06 17:33 ` Borislav Petkov
2026-07-03 8:41 ` Sandipan Das [this message]
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=44959c7f-fedd-413e-bb2f-07f97142aef8@amd.com \
--to=sandipan.das@amd.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@kernel.org \
--cc=lijing@hygon.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=liuqi@hygon.cn \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=x86@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