diff options
author | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2020-12-03 22:08:37 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2020-12-08 11:12:38 +0100 |
commit | 6c4832253a2d2259fd4002e3c4511035f81f48f6 (patch) | |
tree | 26beb1c3e2a954de08cf3ff4e2310f312a757810 | |
parent | tools/power/x86/intel-speed-select: Read TRL from mailbox (diff) | |
download | linux-6c4832253a2d2259fd4002e3c4511035f81f48f6.tar.xz linux-6c4832253a2d2259fd4002e3c4511035f81f48f6.zip |
tools/power/x86/intel-speed-select: Account for missing sysfs for die_id
Some older kernels will not have support to get CPU die_id from the
sysfs. This requires several back ports. But the tool depends on getting
die_id to match to correct CPU.
Relax this restriction and use die_id as 0 when die_id is missing. This
is not a problem as we don't have any multi-die processors with Intel SST
support.
This helps in running this tool on older kernels with just Intel SST
drivers back ported.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://lore.kernel.org/platform-driver-x86/57d6648282491906e0e1f70fe3b9a44f72cec90d.camel@intel.com/
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r-- | tools/power/x86/intel-speed-select/isst-config.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/power/x86/intel-speed-select/isst-config.c b/tools/power/x86/intel-speed-select/isst-config.c index cd089a505859..271bc79bdc59 100644 --- a/tools/power/x86/intel-speed-select/isst-config.c +++ b/tools/power/x86/intel-speed-select/isst-config.c @@ -328,8 +328,12 @@ int get_physical_die_id(int cpu) int core_id, pkg_id, die_id; ret = get_stored_topology_info(cpu, &core_id, &pkg_id, &die_id); - if (!ret) + if (!ret) { + if (die_id < 0) + die_id = 0; + return die_id; + } } if (ret < 0) |