|
Dave Jones |
749c877 |
From: dirk.brandewie@gmail.com
|
|
Dave Jones |
749c877 |
To: linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org
|
|
Dave Jones |
749c877 |
Cc: Dirk Brandewie <dirk.brandewie@gmail.com>,
|
|
Dave Jones |
749c877 |
Dirk Brandewie <dirk.j.brandewie@intel.com>
|
|
Dave Jones |
749c877 |
Subject: [PATCH] cpufreq/intel_pstate: Fix calculation of current frequency
|
|
Dave Jones |
749c877 |
Date: Fri, 22 Mar 2013 10:51:05 -0700
|
|
Dave Jones |
749c877 |
Message-Id: <1363974665-22049-1-git-send-email-dirk.brandewie@gmail.com>
|
|
Dave Jones |
749c877 |
|
|
Dave Jones |
749c877 |
From: Dirk Brandewie <dirk.brandewie@gmail.com>
|
|
Dave Jones |
749c877 |
|
|
Dave Jones |
749c877 |
Use the correct pstate value to calculate the effective frequency.
|
|
Dave Jones |
749c877 |
|
|
Dave Jones |
749c877 |
https://bugzilla.redhat.com/show_bug.cgi?id=923942
|
|
Dave Jones |
749c877 |
Reported-by: Satish Balay <balay@fastmail.fm>
|
|
Dave Jones |
749c877 |
|
|
Dave Jones |
749c877 |
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
|
|
Dave Jones |
749c877 |
---
|
|
Dave Jones |
749c877 |
drivers/cpufreq/intel_pstate.c | 2 +-
|
|
Dave Jones |
749c877 |
1 files changed, 1 insertions(+), 1 deletions(-)
|
|
Dave Jones |
749c877 |
|
|
Dave Jones |
749c877 |
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
|
|
Dave Jones |
749c877 |
index e84af66..ad72922 100644
|
|
Dave Jones |
749c877 |
--- a/drivers/cpufreq/intel_pstate.c
|
|
Dave Jones |
749c877 |
+++ b/drivers/cpufreq/intel_pstate.c
|
|
Dave Jones |
749c877 |
@@ -454,7 +454,7 @@ static inline void intel_pstate_calc_busy(struct cpudata *cpu,
|
|
Dave Jones |
749c877 |
sample->idletime_us * 100,
|
|
Dave Jones |
749c877 |
sample->duration_us);
|
|
Dave Jones |
749c877 |
core_pct = div64_u64(sample->aperf * 100, sample->mperf);
|
|
Dave Jones |
749c877 |
- sample->freq = cpu->pstate.turbo_pstate * core_pct * 1000;
|
|
Dave Jones |
749c877 |
+ sample->freq = cpu->pstate.max_pstate * core_pct * 1000;
|
|
Dave Jones |
749c877 |
|
|
Dave Jones |
749c877 |
sample->core_pct_busy = div_s64((sample->pstate_pct_busy * core_pct),
|
|
Dave Jones |
749c877 |
100);
|
|
Dave Jones |
749c877 |
--
|
|
Dave Jones |
749c877 |
1.7.7.6
|
|
Dave Jones |
749c877 |
|
|
Dave Jones |
749c877 |
--
|
|
Dave Jones |
749c877 |
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
|
|
Dave Jones |
749c877 |
the body of a message to majordomo@vger.kernel.org
|
|
Dave Jones |
749c877 |
More majordomo info at http://vger.kernel.org/majordomo-info.html
|
|
Dave Jones |
749c877 |
Please read the FAQ at http://www.tux.org/lkml/
|
|
Dave Jones |
749c877 |
|