From: maximilian attems Date: Thu, 8 May 2008 20:10:01 +0000 (+0200) Subject: [CPUFREQ] Crusoe: longrun cpufreq module reports false min freq X-Git-Tag: v2.6.26-rc4~59^2~2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=667ad4f70110357e8f024e81741c7bd1d7906e7d;p=linux-2.6 [CPUFREQ] Crusoe: longrun cpufreq module reports false min freq 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 submitted as http://bugs.debian.org/468149 patch ported to x86 Cc: Kaz Sasayama Signed-off-by: maximilian attems Signed-off-by: Dave Jones --- diff --git a/arch/x86/kernel/cpu/cpufreq/longrun.c b/arch/x86/kernel/cpu/cpufreq/longrun.c index af4a867a09..777a7ff075 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);