All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mi, Dapeng" <dapeng1.mi@linux.intel.com>
To: Zide Chen <zide.chen@intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Andi Kleen <ak@linux.intel.com>,
	Eranian Stephane <eranian@google.com>
Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	Xudong Hao <xudong.hao@intel.com>,
	Falcon Thomas <thomas.falcon@intel.com>
Subject: Re: [PATCH 3/7] perf/x86/intel/uncore: Add CBB PMON support for Diamond Rapids
Date: Tue, 23 Dec 2025 11:38:15 +0800	[thread overview]
Message-ID: <6aa56e97-4fff-4a1d-85de-eb1050ed904f@linux.intel.com> (raw)
In-Reply-To: <20251212210007.13986-4-zide.chen@intel.com>


On 12/13/2025 5:00 AM, Zide Chen wrote:
> On DMR, PMON units inside the Core Building Block (CBB) are enumerated
> separately from those in the Integrated Memory and I/O Hub (IMH).
>
> A new per-CBB MSR (0x710) is introduced for discovery table enumeration.
>
> For counter control registers, the tid_en bit (bit 16) exists on CBO,
> SBO, and Santa, but it is not used by any events.  Mark this bit as
> reserved.
>
> Similarly, disallow extended umask (bits 32–63) on Santa and sNCU.
>
> Additionally, ignore broken PMON units for MSE and SB2UCIE.
>
> Signed-off-by: Zide Chen <zide.chen@intel.com>
> ---
>  arch/x86/events/intel/uncore.c           |  1 +
>  arch/x86/events/intel/uncore_discovery.h |  2 +
>  arch/x86/events/intel/uncore_snbep.c     | 48 ++++++++++++++++++++++--
>  3 files changed, 48 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/events/intel/uncore.c b/arch/x86/events/intel/uncore.c
> index 7ab02638e3f1..88c32e528add 100644
> --- a/arch/x86/events/intel/uncore.c
> +++ b/arch/x86/events/intel/uncore.c
> @@ -1847,6 +1847,7 @@ static const struct intel_uncore_init_fun dmr_uncore_init __initconst = {
>  	.pci_init = dmr_uncore_pci_init,
>  	.mmio_init = dmr_uncore_mmio_init,
>  	.discovery_pci = DMR_UNCORE_DISCOVERY_TABLE_DEVICE,
> +	.discovery_msr = DMR_UNCORE_DISCOVERY_MSR,
>  	.uncore_units_ignore = dmr_uncore_units_ignore,
>  };
>  
> diff --git a/arch/x86/events/intel/uncore_discovery.h b/arch/x86/events/intel/uncore_discovery.h
> index 786670276b5f..a558c31ff2b1 100644
> --- a/arch/x86/events/intel/uncore_discovery.h
> +++ b/arch/x86/events/intel/uncore_discovery.h
> @@ -2,6 +2,8 @@
>  
>  /* Store the full address of the global discovery table */
>  #define UNCORE_DISCOVERY_MSR			0x201e
> +/* Alternative MSR that is used by server CPUs like DMR */
> +#define DMR_UNCORE_DISCOVERY_MSR		0x710
>  
>  /* Generic device ID of a discovery table device */
>  #define UNCORE_DISCOVERY_TABLE_DEVICE		0x09a7
> diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c
> index dee94bbdddcf..bd1569876640 100644
> --- a/arch/x86/events/intel/uncore_snbep.c
> +++ b/arch/x86/events/intel/uncore_snbep.c
> @@ -6806,6 +6806,28 @@ static struct intel_uncore_type dmr_uncore_hamvf = {
>  	.attr_update		= uncore_alias_groups,
>  };
>  
> +static struct intel_uncore_type dmr_uncore_cbo = {
> +	.name			= "cbo",
> +	.event_mask_ext		= DMR_HAMVF_EVENT_MASK_EXT,
> +	.format_group		= &dmr_sca_uncore_format_group,
> +	.attr_update		= uncore_alias_groups,
> +};
> +
> +static struct intel_uncore_type dmr_uncore_santa = {
> +	.name			= "santa",
> +	.attr_update		= uncore_alias_groups,
> +};
> +
> +static struct intel_uncore_type dmr_uncore_cncu = {
> +	.name			= "cncu",
> +	.attr_update		= uncore_alias_groups,
> +};
> +
> +static struct intel_uncore_type dmr_uncore_sncu = {
> +	.name			= "sncu",
> +	.attr_update		= uncore_alias_groups,
> +};
> +
>  static struct intel_uncore_type dmr_uncore_ula = {
>  	.name			= "ula",
>  	.event_mask_ext		= DMR_HAMVF_EVENT_MASK_EXT,
> @@ -6813,6 +6835,20 @@ static struct intel_uncore_type dmr_uncore_ula = {
>  	.attr_update		= uncore_alias_groups,
>  };
>  
> +static struct intel_uncore_type dmr_uncore_dda = {
> +	.name			= "dda",
> +	.event_mask_ext		= DMR_HAMVF_EVENT_MASK_EXT,
> +	.format_group		= &dmr_sca_uncore_format_group,
> +	.attr_update		= uncore_alias_groups,
> +};
> +
> +static struct intel_uncore_type dmr_uncore_sbo = {
> +	.name			= "sbo",
> +	.event_mask_ext		= DMR_HAMVF_EVENT_MASK_EXT,
> +	.format_group		= &dmr_sca_uncore_format_group,
> +	.attr_update		= uncore_alias_groups,
> +};
> +
>  static struct intel_uncore_type dmr_uncore_ubr = {
>  	.name			= "ubr",
>  	.event_mask_ext		= DMR_HAMVF_EVENT_MASK_EXT,
> @@ -6901,10 +6937,15 @@ static struct intel_uncore_type *dmr_uncores[UNCORE_DMR_NUM_UNCORE_TYPES] = {
>  	NULL, NULL, NULL,
>  	NULL, NULL,
>  	&dmr_uncore_hamvf,
> -	NULL,
> -	NULL, NULL, NULL,
> +	&dmr_uncore_cbo,
> +	&dmr_uncore_santa,
> +	&dmr_uncore_cncu,
> +	&dmr_uncore_sncu,
>  	&dmr_uncore_ula,
> -	NULL, NULL, NULL, NULL,
> +	&dmr_uncore_dda,
> +	NULL,
> +	&dmr_uncore_sbo,
> +	NULL,
>  	NULL, NULL, NULL,
>  	&dmr_uncore_ubr,
>  	NULL,
> @@ -6919,6 +6960,7 @@ static struct intel_uncore_type *dmr_uncores[UNCORE_DMR_NUM_UNCORE_TYPES] = {
>  
>  int dmr_uncore_units_ignore[] = {
>  	0x13,		/* MSE */
> +	0x25,		/* SB2UCIE */
>  	UNCORE_IGNORE_END
>  };
>  

LGTM. Reviewed-by: Dapeng Mi <dapeng1.mi@linux.intel.com>



  reply	other threads:[~2025-12-23  3:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-12 21:00 [PATCH 0/7] Add Diamond Rapids uncore support Zide Chen
2025-12-12 21:00 ` [PATCH 1/7] perf/x86/intel/uncore: Add dual PCI/MSR discovery support Zide Chen
2025-12-23  3:07   ` Mi, Dapeng
2025-12-12 21:00 ` [PATCH 2/7] perf/x86/intel/uncore: Add IMH PMON support for Diamond Rapids Zide Chen
2025-12-23  3:27   ` Mi, Dapeng
2025-12-12 21:00 ` [PATCH 3/7] perf/x86/intel/uncore: Add CBB " Zide Chen
2025-12-23  3:38   ` Mi, Dapeng [this message]
2025-12-12 21:00 ` [PATCH 4/7] perf/x86/intel/uncore: Add freerunning event descriptor helper macro Zide Chen
2025-12-23  3:39   ` Mi, Dapeng
2025-12-12 21:00 ` [PATCH 5/7] perf/x86/intel/uncore: Support IIO free-running counters on DMR Zide Chen
2025-12-23  5:18   ` Mi, Dapeng
2025-12-23 21:54     ` Chen, Zide
2025-12-12 21:00 ` [PATCH 6/7] perf/x86/intel/uncore: Update DMR uncore constraints preliminarily Zide Chen
2025-12-23  5:52   ` Mi, Dapeng
2025-12-23 21:53     ` Chen, Zide
2025-12-12 21:00 ` [PATCH 7/7] perf pmu: Relax uncore wildcard matching to allow numeric suffix Zide Chen
2025-12-23  5:58   ` Mi, Dapeng

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=6aa56e97-4fff-4a1d-85de-eb1050ed904f@linux.intel.com \
    --to=dapeng1.mi@linux.intel.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=thomas.falcon@intel.com \
    --cc=xudong.hao@intel.com \
    --cc=zide.chen@intel.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 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.