From: Mario Limonciello <mario.limonciello@amd.com>
To: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>,
hansg@kernel.org, ilpo.jarvinen@linux.intel.com
Cc: platform-driver-x86@vger.kernel.org, Patil.Reddy@amd.com
Subject: Re: [PATCH v2 0/6] platform/x86/amd/pmf: Add 1AH_M80H support and accumulator based NPU metrics
Date: Mon, 13 Jul 2026 13:47:38 -0500 [thread overview]
Message-ID: <af647ac4-d349-4ece-8167-7be353a227f3@amd.com> (raw)
In-Reply-To: <20260713183936.690228-1-Shyam-sundar.S-k@amd.com>
On 7/13/26 13:39, Shyam Sundar S K wrote:
> This series cleans up the PMF-SMU mailbox handling, adds support for the
> AMD 1AH_M80H (Family 1AH Model 80H) platform, and introduces NPU metrics
> retrieval for it based on a firmware managed DRAM metrics table.
>
> Today the SMU mailbox register offsets are hardcoded in the send path,
> which does not scale to platforms that use a different mailbox layout.
> The first two patches address this: patch 1 moves the offsets into a
> per-SoC struct amd_pmf_smu_regs carried as PCI driver_data, so all
> existing platforms share a single legacy instance and new platforms only
> add a table entry. Patch 2 then adds the 1AH_M80H device/ACPI IDs and its
> extended mailbox, which uses three argument registers to return the
> 64-bit DRAM address and size of the metrics table.
>
> Patches 3 and 4 are pure refactors with no functional change: the metrics
> code moves out of core.c into a dedicated metrics.c, and the NPU metrics
> retrieval is restructured around a per-CPU-ID switch so additional table
> formats can be slotted in cleanly.
>
> Patch 5 builds on that to add 1AH_M80H NPU metrics. Unlike earlier
> platforms that copy a transfer table, 1AH_M80H exposes an accumulator
> based metrics table (amd_pmf_metrics_v3) in DRAM; NPU values are derived
> by delta calculation between consecutive samples, with the first sample
> discarded to seed the baseline. This also extends amd_pmf_npu_metrics
> with npu_temp, sourced from the new npu_temp_acc accumulator.
>
> The series applies cleanly and existing platforms see no functional
> change.
>
> This series is based on top of the review-ilpo-next branch, with commit
> f6ee11d77d15 as the head.
>
> v2:
> - Change the amd_pmf_legacy_smu_regs to amd_pmf_smu_regs_v1 and v2 for 1ah_m80h
> - Remove arg0, arg1, arg2 comments wriiten in the amd_pmf_smu_regs_v2 struct
> - Update git commit messages with amd_pmf_smu_regs_v1 and amd_pmf_smu_regs_v2 accordingly
> - Add includes and introduce separate patch for upper/lower_32_bits()
> - Use DIV_U64_ROUND_CLOSEST() instead of DIV_ROUND_CLOSEST_ULL()
> - Use macros present in units.h
> - Replace is_amd_pmf_1ah_m80h() with amd_pmf_supports_accumulator_metrics()
> - Add Reviewed-by tags
>
> Shyam Sundar S K (6):
> platform/x86/amd/pmf: Use per-SoC smu_regs struct for SMU mailbox
> registers
> platform/x86/amd/pmf: Add 1AH_M80H device IDs and extended SMU mailbox
> registers
> platform/x86/amd/pmf: Move metrics code to dedicated file
> platform/x86/amd/pmf: Use upper/lower_32_bits() in
> amd_pmf_set_dram_addr()
> platform/x86/amd/pmf: Refactor NPU metrics for platform extensibility
> platform/x86/amd/pmf: Add 1AH_M80H metrics table and NPU metrics
> support
>
> drivers/platform/x86/amd/pmf/Makefile | 2 +-
> drivers/platform/x86/amd/pmf/core.c | 254 +++++++------------
> drivers/platform/x86/amd/pmf/metrics.c | 330 +++++++++++++++++++++++++
> drivers/platform/x86/amd/pmf/pmf.h | 233 +++++++++++++++++
> include/linux/amd-pmf-io.h | 2 +
> 5 files changed, 654 insertions(+), 167 deletions(-)
> create mode 100644 drivers/platform/x86/amd/pmf/metrics.c
>
For remaining patches I didn't previously review.
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
prev parent reply other threads:[~2026-07-13 18:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-13 18:39 [PATCH v2 0/6] platform/x86/amd/pmf: Add 1AH_M80H support and accumulator based NPU metrics Shyam Sundar S K
2026-07-13 18:39 ` [PATCH v2 1/6] platform/x86/amd/pmf: Use per-SoC smu_regs struct for SMU mailbox registers Shyam Sundar S K
2026-07-13 18:39 ` [PATCH v2 2/6] platform/x86/amd/pmf: Add 1AH_M80H device IDs and extended " Shyam Sundar S K
2026-07-13 18:39 ` [PATCH v2 3/6] platform/x86/amd/pmf: Move metrics code to dedicated file Shyam Sundar S K
2026-07-13 18:39 ` [PATCH v2 4/6] platform/x86/amd/pmf: Use upper/lower_32_bits() in amd_pmf_set_dram_addr() Shyam Sundar S K
2026-07-13 18:39 ` [PATCH v2 5/6] platform/x86/amd/pmf: Refactor NPU metrics for platform extensibility Shyam Sundar S K
2026-07-13 18:39 ` [PATCH v2 6/6] platform/x86/amd/pmf: Add 1AH_M80H metrics table and NPU metrics support Shyam Sundar S K
2026-07-13 18:47 ` Mario Limonciello [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=af647ac4-d349-4ece-8167-7be353a227f3@amd.com \
--to=mario.limonciello@amd.com \
--cc=Patil.Reddy@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=platform-driver-x86@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.