summaryrefslogtreecommitdiff
path: root/tools/power
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2022-08-08 20:56:04 +0300
committerSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2023-03-22 23:36:52 +0300
commit9798768ce9bc4da626091f4f87fc0a8edbee44d5 (patch)
treef600e61c81489dd38e351bb67cd2404daf3f25ea /tools/power
parent05aab5b8c1b78c028cd95701e788623de744d1cd (diff)
downloadlinux-9798768ce9bc4da626091f4f87fc0a8edbee44d5.tar.xz
tools/power/x86/intel-speed-select: Introduce is_debug_enabled()
Platform specific code also needs to give debug output. Introduce is_debug_enabled() for this purpose. No functional changes are expected. Signed-off-by: Zhang Rui <rui.zhang@intel.com> [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Diffstat (limited to 'tools/power')
-rw-r--r--tools/power/x86/intel-speed-select/isst-config.c5
-rw-r--r--tools/power/x86/intel-speed-select/isst.h1
2 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 fb83f74f15a4..591fe30a55b0 100644
--- a/tools/power/x86/intel-speed-select/isst-config.c
+++ b/tools/power/x86/intel-speed-select/isst-config.c
@@ -77,6 +77,11 @@ FILE *get_output_file(void)
return outf;
}
+int is_debug_enabled(void)
+{
+ return debug_flag;
+}
+
void debug_printf(const char *format, ...)
{
va_list args;
diff --git a/tools/power/x86/intel-speed-select/isst.h b/tools/power/x86/intel-speed-select/isst.h
index 6839ad2d2b9d..b3bf989690d6 100644
--- a/tools/power/x86/intel-speed-select/isst.h
+++ b/tools/power/x86/intel-speed-select/isst.h
@@ -216,6 +216,7 @@ extern int get_max_punit_core_id(struct isst_id *id);
/* Common interfaces */
FILE *get_output_file(void);
+extern int is_debug_enabled(void);
extern void debug_printf(const char *format, ...);
extern int out_format_is_json(void);
extern void set_isst_id(struct isst_id *id, int cpu);