summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/power/x86/intel-speed-select/isst-config.c6
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)