]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
tools/power/x86/intel-speed-select: Add pkg and die in isst_id
authorZhang Rui <rui.zhang@intel.com>
Sat, 20 Aug 2022 15:58:19 +0000 (23:58 +0800)
committerSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Thu, 15 Sep 2022 18:16:05 +0000 (11:16 -0700)
Code uses pkg_id and die_id to refer to a specific power domain.

The pkg/die information is already settled at start time. Adding package
id and die id information into struct isst_id so that code does not need
to retrieve them at runtime.

More code cleanups can be done with the package/die info available.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
tools/power/x86/intel-speed-select/isst-config.c
tools/power/x86/intel-speed-select/isst.h

index 2cf3917428c1f305e34a33bfd0880ddcd6f9d69a..bddc0d1ff2d7ed9d00f73fa74b6a059f3213d467 100644 (file)
@@ -362,6 +362,8 @@ int get_physical_die_id(int cpu)
 void set_isst_id(struct isst_id *id, int cpu)
 {
        id->cpu = cpu;
+       id->pkg = get_physical_package_id(cpu);
+       id->die = get_physical_die_id(cpu);
 }
 
 int get_cpufreq_base_freq(int cpu)
index fb6288087fb111cd3c333ee673ca201406df44e6..4bab3b2dce5d3459b2b3e8bd0805388b02d88406 100644 (file)
@@ -82,6 +82,8 @@
 /* Unified structure to specific a CPU or a Power Domain */
 struct isst_id {
        int cpu;
+       int pkg;
+       int die;
 };
 
 struct isst_clos_config {