summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/powernow-k7.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-03-14 18:18:34 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-03-15 18:52:29 +0300
commite4c204ced0ac25e02e58679f07096c5bac0b0d96 (patch)
tree55363eb8c97522ad447b9c7e3126f71509582780 /drivers/cpufreq/powernow-k7.h
parent3f8ed54aee491bbb83656592c2d0ad7b78d045ca (diff)
downloadlinux-e4c204ced0ac25e02e58679f07096c5bac0b0d96.tar.xz
cpufreq: intel_pstate: Avoid percentages in limits-related computations
Currently, intel_pstate_update_perf_limits() first converts the policy minimum and maximum limits into percentages of the maximum turbo frequency (rounding up to an integer) and then converts these percentages to fractions (by using fixed-point arithmetic to divide them by 100). That introduces a rounding error unnecessarily, because the fractions can be obtained by carrying out fixed-point divisions directly on the input numbers. Rework the computations in intel_pstate_hwp_set() to use fractions instead of percentages (and drop redundant local variables from there) and modify intel_pstate_update_perf_limits() to compute the fractions directly and percentages out of them. While at it, introduce percent_ext_fp() for converting percentages to fractions (with extended number of fraction bits) and use it in the computations. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/powernow-k7.h')
0 files changed, 0 insertions, 0 deletions