diff options
author | Dirk Brandewie <dirk.brandewie@gmail.com> | 2013-03-23 19:54:39 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-03-25 10:12:59 -0400 |
commit | e6f3eb29be471c4b536a91daab76d4aeda72a261 (patch) | |
tree | 486b428bb7ade6c304ba82e909dca262fce8ef54 /drivers/cpufreq | |
parent | b563b4e3f2dd601e19b46ada31bd176fc0a16efc (diff) |
cpufreq / intel_pstate: Fix calculation of current frequency
Use the correct pstate value to calculate the effective frequency.
References: https://bugzilla.redhat.com/show_bug.cgi?id=923942
Reported-by: Satish Balay <balay@fastmail.fm>
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/intel_pstate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index cd9c5f4f5805..b662529072f7 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c | |||
@@ -454,7 +454,7 @@ static inline void intel_pstate_calc_busy(struct cpudata *cpu, | |||
454 | sample->idletime_us * 100, | 454 | sample->idletime_us * 100, |
455 | sample->duration_us); | 455 | sample->duration_us); |
456 | core_pct = div64_u64(sample->aperf * 100, sample->mperf); | 456 | core_pct = div64_u64(sample->aperf * 100, sample->mperf); |
457 | sample->freq = cpu->pstate.turbo_pstate * core_pct * 1000; | 457 | sample->freq = cpu->pstate.max_pstate * core_pct * 1000; |
458 | 458 | ||
459 | sample->core_pct_busy = div_s64((sample->pstate_pct_busy * core_pct), | 459 | sample->core_pct_busy = div_s64((sample->pstate_pct_busy * core_pct), |
460 | 100); | 460 | 100); |