aboutsummaryrefslogtreecommitdiffstats
path: root/tools/power/x86/intel-speed-select/isst-config.c
diff options
context:
space:
mode:
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2019-11-04 03:02:44 -0800
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2019-11-07 19:00:25 +0200
commit7af5a95bb752702bfc91fc513d37f1f799e6fd1f (patch)
tree438e8084d1cdcf30ee09c22d4a28390b7ed28b65 /tools/power/x86/intel-speed-select/isst-config.c
parenttools/power/x86/intel-speed-select: Use Frequency weight for CLOS (diff)
downloadlinux-dev-7af5a95bb752702bfc91fc513d37f1f799e6fd1f.tar.xz
linux-dev-7af5a95bb752702bfc91fc513d37f1f799e6fd1f.zip
tools/power/x86/intel-speed-select: Support platform with limited Intel(R) Speed Select
There are some platforms, where there limited support of Intel(R) SST features. Here perf-profile has only one base configuration and limited support of commands. But still has support for discovery of base-freq and turbo-freq features. So it is important to show minimum features to use base-freq and turbo-freq features. Here the change are: - When there is no support of CONFIG_TDP_GET_LEVELS_INFO, then instead of treating this as fatal error, treat this with number of config levels = 0, that means only base level 0 is present. - There is no support of mail box commands to get base frequencies or turbo frequencies. Here present base frequency by reading cpufreq base freq and turbo frequency by reading MSR 0x1AD. - Don't display any field, which has value == 0. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'tools/power/x86/intel-speed-select/isst-config.c')
-rw-r--r--tools/power/x86/intel-speed-select/isst-config.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/power/x86/intel-speed-select/isst-config.c b/tools/power/x86/intel-speed-select/isst-config.c
index 2d7ed27af7e0..2dffb67d3194 100644
--- a/tools/power/x86/intel-speed-select/isst-config.c
+++ b/tools/power/x86/intel-speed-select/isst-config.c
@@ -200,6 +200,11 @@ int get_physical_die_id(int cpu)
return ret;
}
+int get_cpufreq_base_freq(int cpu)
+{
+ return parse_int_file(0, "/sys/devices/system/cpu/cpu%d/cpufreq/base_frequency", cpu);
+}
+
int get_topo_max_cpus(void)
{
return topo_max_cpus;
@@ -598,6 +603,7 @@ int isst_send_mbox_command(unsigned int cpu, unsigned char command,
fprintf(outf,
"Error: mbox_cmd cpu:%d command:%x sub_command:%x parameter:%x req_data:%x\n",
cpu, command, sub_command, parameter, req_data);
+ return -1;
} else {
*resp = mbox_cmds.mbox_cmd[0].resp_data;
debug_printf(