mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] cpufreq/intel_pstate: Fix calculation of current frequency
@ 2013-03-22 17:51 dirk.brandewie
  2013-03-23  0:14 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: dirk.brandewie @ 2013-03-22 17:51 UTC (permalink / raw)
  To: linux-kernel, cpufreq; +Cc: Dirk Brandewie, Dirk Brandewie

From: Dirk Brandewie <dirk.brandewie@gmail.com>

Use the correct pstate value to calculate the effective frequency.

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>
---
 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 e84af66..ad72922 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,
 					sample->idletime_us * 100,
 					sample->duration_us);
 	core_pct = div64_u64(sample->aperf * 100, sample->mperf);
-	sample->freq = cpu->pstate.turbo_pstate * core_pct * 1000;
+	sample->freq = cpu->pstate.max_pstate * core_pct * 1000;
 
 	sample->core_pct_busy = div_s64((sample->pstate_pct_busy * core_pct),
 					100);
-- 
1.7.7.6


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-23  0:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-22 17:51 [PATCH] cpufreq/intel_pstate: Fix calculation of current frequency dirk.brandewie
2013-03-23  0:14 ` Rafael J. Wysocki

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®