Skip to content

Commit bb9a9bf

Browse files
spandruvadajwrdegoede
authored andcommitted
platform/x86/intel-uncore-freq: Do not present separate package-die domain
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> Link: https://lore.kernel.org/r/20240820204558.1296319-1-srinivas.pandruvada@linux.intel.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
1 parent 1e70137 commit bb9a9bf

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/platform/x86/intel/uncore-frequency/uncore-frequency-tpmi.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,9 @@ static int uncore_probe(struct auxiliary_device *auxdev, const struct auxiliary_
427427

428428
auxiliary_set_drvdata(auxdev, tpmi_uncore);
429429

430+
if (topology_max_dies_per_package() > 1)
431+
return 0;
432+
430433
tpmi_uncore->root_cluster.root_domain = true;
431434
tpmi_uncore->root_cluster.uncore_root = tpmi_uncore;
432435

@@ -450,7 +453,9 @@ static void uncore_remove(struct auxiliary_device *auxdev)
450453
{
451454
struct tpmi_uncore_struct *tpmi_uncore = auxiliary_get_drvdata(auxdev);
452455

453-
uncore_freq_remove_die_entry(&tpmi_uncore->root_cluster.uncore_data);
456+
if (tpmi_uncore->root_cluster.root_domain)
457+
uncore_freq_remove_die_entry(&tpmi_uncore->root_cluster.uncore_data);
458+
454459
remove_cluster_entries(tpmi_uncore);
455460

456461
uncore_freq_common_exit();

0 commit comments

Comments
 (0)