From: Chen Yu <yu.c.chen@intel.com>
To: len.brown@intel.com
Cc: rjw@rjwysocki.net, srinivas.pandruvada@intel.com,
rui.zhang@intel.com, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] tools/power turbostat: bugfix: fix several invalid parameters
Date: Sun, 13 Dec 2015 21:09:49 +0800 [thread overview]
Message-ID: <b7a8feb0effba7b59ea55288fd1b3dc0ecbfbd66.1450011064.git.yu.c.chen@intel.com> (raw)
In-Reply-To: <cover.1450011064.git.yu.c.chen@intel.com>
dump_cstate_pstate_config_info is invoked with no parameters,
which might cause this function to misjudge the processor family
and model. Fix this by passing family and model to it.
Besides, fix the compiling warning caused by missing type declaration
in dump_cstate_pstate_config_info, get_tdp and perf_limit_reasons_probe:
turbostat.c: In function ‘dump_cstate_pstate_config_info’:
turbostat.c:1973:1: warning: type of ‘family’ defaults to ‘int’ [-Wimplicit-int]
dump_cstate_pstate_config_info(family, model)
^
turbostat.c:1973:1: warning: type of ‘model’ defaults to ‘int’ [-Wimplicit-int]
turbostat.c: In function ‘get_tdp’:
turbostat.c:2145:8: warning: type of ‘model’ defaults to ‘int’ [-Wimplicit-int]
double get_tdp(model)
^
turbostat.c: In function ‘perf_limit_reasons_probe’:
turbostat.c:2259:6: warning: type of ‘family’ defaults to ‘int’ [-Wimplicit-int]
void perf_limit_reasons_probe(family, model)
^
turbostat.c:2259:6: warning: type of ‘model’ defaults to ‘int’ [-Wimplicit-int]
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
---
tools/power/x86/turbostat/turbostat.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index 9854929..47068de 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -1970,7 +1970,7 @@ int has_config_tdp(unsigned int family, unsigned int model)
}
static void
-dump_cstate_pstate_config_info(family, model)
+dump_cstate_pstate_config_info(unsigned int family, unsigned int model)
{
if (!do_nhm_platform_info)
return;
@@ -2142,7 +2142,7 @@ int print_perf_limit(struct thread_data *t, struct core_data *c, struct pkg_data
#define RAPL_POWER_GRANULARITY 0x7FFF /* 15 bit power granularity */
#define RAPL_TIME_GRANULARITY 0x3F /* 6 bit time granularity */
-double get_tdp(model)
+double get_tdp(unsigned int model)
{
unsigned long long msr;
@@ -2256,7 +2256,7 @@ void rapl_probe(unsigned int family, unsigned int model)
return;
}
-void perf_limit_reasons_probe(family, model)
+void perf_limit_reasons_probe(unsigned int family, unsigned int model)
{
if (!genuine_intel)
return;
@@ -2792,7 +2792,7 @@ void process_cpuid()
perf_limit_reasons_probe(family, model);
if (debug)
- dump_cstate_pstate_config_info();
+ dump_cstate_pstate_config_info(family, model);
if (has_skl_msrs(family, model))
calculate_tsc_tweak();
--
1.8.4.2
next prev parent reply other threads:[~2015-12-13 13:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-13 13:09 [PATCH 0/2] tools/power turbostat: Fix TDP MSR bits and " Chen Yu
2015-12-13 13:09 ` [PATCH 1/2] tools/power turbostat: bugfix: TDP MSRs print bits fixing Chen Yu
2016-03-13 7:38 ` Len Brown
2015-12-13 13:09 ` Chen Yu [this message]
2016-03-13 7:28 ` [PATCH 2/2] tools/power turbostat: bugfix: fix several invalid parameters Len Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b7a8feb0effba7b59ea55288fd1b3dc0ecbfbd66.1450011064.git.yu.c.chen@intel.com \
--to=yu.c.chen@intel.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=rui.zhang@intel.com \
--cc=srinivas.pandruvada@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome