The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] platform/x86/intel-uncore-freq: Do not present separate package-die domain
@ 2024-07-31 18:57 Srinivas Pandruvada
  2024-08-12 11:16 ` Ilpo Järvinen
  0 siblings, 1 reply; 5+ messages in thread
From: Srinivas Pandruvada @ 2024-07-31 18:57 UTC (permalink / raw)
  To: hdegoede, ilpo.jarvinen, andriy.shevchenko
  Cc: platform-driver-x86, linux-kernel, Srinivas Pandruvada

The scope of uncore control is per power domain in a package and die.
A package-die can have multiple power domains on some processors. In this
case package-die domain (root domain) aggregates all information from
power domains in it.

On some processors, CPUID enumerates the die number same as power domain
ID. In this case there is one to one relationship between package-die and
power domain ID. There is no use of aggregating information from all
power domain IDs as the information will be duplicate and confusing. In
this case do not create separate package-die domain.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
---
 .../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 9fa3037c03d1..6c2e607968f2 100644
--- a/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-tpmi.c
+++ b/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-tpmi.c
@@ -427,6 +427,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;
 
@@ -450,7 +453,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();
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-08-13 13:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-31 18:57 [PATCH] platform/x86/intel-uncore-freq: Do not present separate package-die domain Srinivas Pandruvada
2024-08-12 11:16 ` Ilpo Järvinen
2024-08-12 17:09   ` srinivas pandruvada
2024-08-13  7:51     ` Ilpo Järvinen
2024-08-13 13:58       ` srinivas pandruvada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox