mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Crusoe: longrun cpufreq module reports false min freq
@ 2008-05-08 20:10 maximilian attems
  0 siblings, 0 replies; only message in thread
From: maximilian attems @ 2008-05-08 20:10 UTC (permalink / raw)
  To: James Bottomley
  Cc: Ingo Molnar, linux-kernel, maximilian attems, Kaz Sasayama

The longrun cpufreq module reports a false minimum frequency 3MHz on
300-600MHz Crusoe processor.  This may be due to a calculation bug
in the module.

Original patch from Kaz Sasayama <kazssym@hypercore.co.jp>
submitted as http://bugs.debian.org/468149 patch ported to x86

Cc: Kaz Sasayama <kazssym@hypercore.co.jp>
Signed-off-by: maximilian attems <max@stro.at>
---
 arch/x86/kernel/cpu/cpufreq/longrun.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/cpu/cpufreq/longrun.c b/arch/x86/kernel/cpu/cpufreq/longrun.c
index af4a867..777a7ff 100644
--- a/arch/x86/kernel/cpu/cpufreq/longrun.c
+++ b/arch/x86/kernel/cpu/cpufreq/longrun.c
@@ -245,7 +245,7 @@ static unsigned int __init longrun_determine_freqs(unsigned int *low_freq,
 	if ((ecx > 95) || (ecx == 0) || (eax < ebx))
 		return -EIO;
 
-	edx = (eax - ebx) / (100 - ecx);
+	edx = ((eax - ebx) * 100) / (100 - ecx);
 	*low_freq = edx * 1000; /* back to kHz */
 
 	dprintk("low frequency is %u kHz\n", *low_freq);
-- 
1.5.5.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-08 20:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-08 20:10 [PATCH] Crusoe: longrun cpufreq module reports false min freq maximilian attems

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®