From: "Chen, Zide" <zide.chen@intel.com>
To: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 06/12] perf/x86/intel/uncore: Fix SPR/EMR/GNR/SRF IMC and HBM event formats
Date: Fri, 4 Dec 2026 22:41:26 -0600 [thread overview]
Message-ID: <6cfee0d6-48b3-478e-9d0c-4294fd860944@intel.com> (raw)
In-Reply-To: <sashiko-outbox-251004@kernel.org>
On 12/4/2026 9:49 PM, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential
> issue to consider:
> - [Low] perf/x86/intel/uncore: SPR_UNCORE_MMIO_COMMON_FORMAT()
> duplicates defaults
> --
>
> commit 3da01c0f67231ec78a98734f80d875faa2f8e3b8
> Author: Zide Chen <zide.chen@intel.com>
>
> perf/x86/intel/uncore: Fix SPR/EMR/GNR/SRF IMC and HBM event formats
>
> This commit redefines SPR_UNCORE_MMIO_COMMON_FORMAT() without
> event_mask_ext using skx_uncore_format_group, and switches spr_uncore_hbm
> to use it so IMC and HBM expose an 8-bit umask in sysfs.
>
>> diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c
>> index 9e164beb32c53..14232ef4f77bd 100644
>> --- a/arch/x86/events/intel/uncore_snbep.c
>> +++ b/arch/x86/events/intel/uncore_snbep.c
>> @@ -5926,8 +5926,11 @@ static struct uncore_event_desc spr_uncore_imc_events[] = {
>> { /* end: all zeroes */ },
>> };
>>
>> +/* 32-bit MMIO counter control registers (4-byte stride, no upper dword) */
>> #define SPR_UNCORE_MMIO_COMMON_FORMAT() \
>> - SPR_UNCORE_COMMON_FORMAT()
>> + .event_mask = SNBEP_PMON_RAW_EVENT_MASK, \
>> + .format_group = &skx_uncore_format_group, \
>> + .attr_update = uncore_alias_groups
>>
>> static struct intel_uncore_type spr_uncore_imc = {
>> SPR_UNCORE_MMIO_COMMON_FORMAT(),
>
> [Severity: Low]
> Can SPR_UNCORE_MMIO_COMMON_FORMAT() be dropped instead of redefining it
> with legacy SNB-EP and SKX symbols?
>
> Its users (spr_uncore_imc, spr_uncore_hbm, and gnr_uncore_imc) all go
> through intel_uncore_generic_init_uncores(), which already leaves
> event_mask_ext zeroed and sets equivalent defaults
> (GENERIC_PMON_RAW_EVENT_MASK and &generic_uncore_format_group).
>
> Setting .attr_update = uncore_alias_groups directly on those types would
> match sibling discovery-based 32-bit types like spr_uncore_pcu.
>
Again, very good catch!
As suggested, I will drop SPR_UNCORE_MMIO_COMMON_FORMAT() in v2 and set
.attr_update directly on spr_uncore_imc, spr_uncore_hbm, gnr_uncore_imc.
Drop another macro and reduce 6 LOC!
next prev parent reply other threads:[~2026-12-05 4:41 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-05 3:22 [PATCH 00/12] perf/x86/intel/uncore: Fix 64-bit counter config Zide Chen
2026-12-05 3:22 ` [PATCH 01/12] perf/x86/intel/uncore: Fix PCU filter band mask calculation Zide Chen
2026-12-05 3:22 ` [PATCH 02/12] perf/x86/intel/uncore: Fix ICX UPI and M3UPI box control offset Zide Chen
2026-12-05 3:22 ` [PATCH 03/12] perf/x86/intel/uncore: Replace CTL_OFFS8 box flag with type flag Zide Chen
2026-12-05 3:22 ` [PATCH 04/12] perf/x86/intel/uncore: Fix DMR MMIO counter control stride Zide Chen
2026-12-05 3:22 ` [PATCH 05/12] perf/x86/intel/uncore: Drop spr_uncore_mmio_ops for generic MMIO Zide Chen
2026-12-05 3:22 ` [PATCH 06/12] perf/x86/intel/uncore: Fix SPR/EMR/GNR/SRF IMC and HBM event formats Zide Chen
2026-12-05 3:49 ` sashiko-bot
2026-12-05 4:41 ` Chen, Zide [this message]
2026-12-05 3:22 ` [PATCH 07/12] perf/x86/intel/uncore: Program upper dword in generic ops Zide Chen
2026-12-05 3:22 ` [PATCH 08/12] perf/x86/intel/uncore: Drop spr_uncore_pci_ops for generic PCI Zide Chen
2026-12-05 3:46 ` sashiko-bot
2026-12-05 4:41 ` Chen, Zide
2026-12-05 3:22 ` [PATCH 09/12] perf/x86/intel/uncore: Fix SKX/SNR/ICX PCI extended umask truncation Zide Chen
2026-12-05 3:22 ` [PATCH 10/12] perf/x86/intel/uncore: Program SNR PCIe3 upper filter before enable Zide Chen
2026-12-05 3:22 ` [PATCH 11/12] perf/x86/intel/uncore: Consolidate SKX, SNR and ICX PCI uncore ops Zide Chen
2026-12-05 3:53 ` sashiko-bot
2026-12-05 4:42 ` Chen, Zide
2026-12-05 3:22 ` [PATCH 12/12] perf/x86/intel/uncore: Fix DMR IMC threshold field Zide Chen
2026-12-05 3:54 ` [PATCH 00/12] perf/x86/intel/uncore: Fix 64-bit counter config sashiko-bot
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=6cfee0d6-48b3-478e-9d0c-4294fd860944@intel.com \
--to=zide.chen@intel.com \
--cc=linux-perf-users@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox