From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: andriy.shevchenko@intel.com
Cc: platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, prarit@redhat.com,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Subject: [PATCH 03/10] tools/power/x86/intel-speed-select: Correct CLX-N frequency units
Date: Mon, 4 Nov 2019 03:02:39 -0800 [thread overview]
Message-ID: <20191104110246.70465-4-srinivas.pandruvada@linux.intel.com> (raw)
In-Reply-To: <20191104110246.70465-1-srinivas.pandruvada@linux.intel.com>
In CLX_N base_frequency is read from cpufreq sysfs, where units are in
KHz. The internal units in the code matches the real ratios which are
in 100MHz scale. So when storing units for CLX-N frequencies, convert
to 100MHz scale.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
---
tools/power/x86/intel-speed-select/isst-config.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/power/x86/intel-speed-select/isst-config.c b/tools/power/x86/intel-speed-select/isst-config.c
index 1c20048b42e7..bfa42fc6c4d2 100644
--- a/tools/power/x86/intel-speed-select/isst-config.c
+++ b/tools/power/x86/intel-speed-select/isst-config.c
@@ -840,8 +840,8 @@ static int clx_n_config(int cpu)
}
/* convert frequencies back to ratios */
- pbf_info->p1_high = pbf_info->p1_high / DISP_FREQ_MULTIPLIER;
- pbf_info->p1_low = pbf_info->p1_low / DISP_FREQ_MULTIPLIER;
+ pbf_info->p1_high = pbf_info->p1_high / 100000;
+ pbf_info->p1_low = pbf_info->p1_low / 100000;
/* create high priority cpu mask */
pbf_info->core_cpumask_size = alloc_cpu_set(&pbf_info->core_cpumask);
@@ -856,7 +856,7 @@ static int clx_n_config(int cpu)
cpu_bf = parse_int_file(1,
"/sys/devices/system/cpu/cpu%d/cpufreq/base_frequency",
i);
- cpu_bf = cpu_bf / DISP_FREQ_MULTIPLIER;
+ cpu_bf = cpu_bf / 100000;
if (cpu_bf == pbf_info->p1_high)
CPU_SET_S(i, pbf_info->core_cpumask_size,
pbf_info->core_cpumask);
--
2.17.2
next prev parent reply other threads:[~2019-11-04 11:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-04 11:02 [PATCH 00/10] tools/power/x86/intel-speed-select: New version Srinivas Pandruvada
2019-11-04 11:02 ` [PATCH 01/10] tools/power/x86/intel-speed-select: Extend command set for perf-profile Srinivas Pandruvada
2019-11-04 11:02 ` [PATCH 02/10] tools/power/x86/intel-speed-select: Change display of "avx" to "avx2" Srinivas Pandruvada
2019-11-04 11:02 ` Srinivas Pandruvada [this message]
2019-11-04 11:02 ` [PATCH 04/10] tools/power/x86/intel-speed-select: Auto mode for CLX Srinivas Pandruvada
2019-11-04 11:02 ` [PATCH 05/10] tools/power/x86/intel-speed-select: Use mailbox for CLOS_PM_QOS_CONFIG Srinivas Pandruvada
2019-11-04 11:02 ` [PATCH 06/10] tools/power/x86/intel-speed-select: Make CLOS frequency in MHz Srinivas Pandruvada
2019-11-04 11:02 ` [PATCH 07/10] tools/power/x86/intel-speed-select: Use Frequency weight for CLOS Srinivas Pandruvada
2019-11-04 11:02 ` [PATCH 08/10] tools/power/x86/intel-speed-select: Support platform with limited Intel(R) Speed Select Srinivas Pandruvada
2019-11-04 11:02 ` [PATCH 09/10] tools/power/x86/intel-speed-select: Use core count for base-freq mask Srinivas Pandruvada
2019-11-04 11:02 ` [PATCH 10/10] tools/power/x86/intel-speed-select: Increment version Srinivas Pandruvada
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=20191104110246.70465-4-srinivas.pandruvada@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=andriy.shevchenko@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=prarit@redhat.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
all inboxes | Powered by JetHome®