public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
	platform-driver-x86@vger.kernel.org,
	 LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] platform/x86/intel-uncore-freq: Do not present separate package-die domain
Date: Wed, 21 Aug 2024 10:30:37 +0300 (EEST)	[thread overview]
Message-ID: <7dca8e46-4c33-875d-d645-55bb9bbc421f@linux.intel.com> (raw)
In-Reply-To: <20240820204558.1296319-1-srinivas.pandruvada@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 2610 bytes --]

On Tue, 20 Aug 2024, Srinivas Pandruvada wrote:

> The scope of uncore control is per power domain with TPMI.
> 
> There are two types of processor topologies can be presented by CPUID
> extended topology leaf irrespective of the hardware architecture:
> 
> 1. A die is not enumerated in CPUID. In this case there is only one die
> in a package is visible. In this case there can be multiple power domains
> in a single die.
> 2. A power domain in a package is enumerated as a die in CPUID. So
> there is one power domain per die.
> 
> To allow die level controls, the current implementation creates a root
> domain and aggregates all information from power domains in it. This
> is well suited for configuration 1 above.
> 
> But for configuration 2 above, the root domain will present the same
> information as present by power domain. So, no use of aggregating. To
> check the configuration, call topology_max_dies_per_package(). If it is
> more than one, avoid creating root domain.
> 
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

-- 
 i.

> ---
> This is a forward looking change as TPMI is architectural and should
> support all topologies.
> 
> v2
> Updated commit description as suggested.
> 
>  .../x86/intel/uncore-frequency/uncore-frequency-tpmi.c     | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-tpmi.c b/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-tpmi.c
> index 2016acf44f6a..e6047fbbea76 100644
> --- a/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-tpmi.c
> +++ b/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-tpmi.c
> @@ -557,6 +557,9 @@ static int uncore_probe(struct auxiliary_device *auxdev, const struct auxiliary_
>  
>  	auxiliary_set_drvdata(auxdev, tpmi_uncore);
>  
> +	if (topology_max_dies_per_package() > 1)
> +		return 0;
> +
>  	tpmi_uncore->root_cluster.root_domain = true;
>  	tpmi_uncore->root_cluster.uncore_root = tpmi_uncore;
>  
> @@ -580,7 +583,9 @@ static void uncore_remove(struct auxiliary_device *auxdev)
>  {
>  	struct tpmi_uncore_struct *tpmi_uncore = auxiliary_get_drvdata(auxdev);
>  
> -	uncore_freq_remove_die_entry(&tpmi_uncore->root_cluster.uncore_data);
> +	if (tpmi_uncore->root_cluster.root_domain)
> +		uncore_freq_remove_die_entry(&tpmi_uncore->root_cluster.uncore_data);
> +
>  	remove_cluster_entries(tpmi_uncore);
>  
>  	uncore_freq_common_exit();
> 

  reply	other threads:[~2024-08-21  7:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-20 20:45 [PATCH v2] platform/x86/intel-uncore-freq: Do not present separate package-die domain Srinivas Pandruvada
2024-08-21  7:30 ` Ilpo Järvinen [this message]
2024-08-26 14:48 ` Hans de Goede

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=7dca8e46-4c33-875d-d645-55bb9bbc421f@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=srinivas.pandruvada@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox