Skip to contentSkip to conversation

speedstep-libc-fix-frequency-multiplier-for-pentium4.patch

PATCH Andrew Morton 1 participant 1 message Feb 5, 2005

lore
Share & tools
lore
#0 lore raw

ack?

From: Matthias-Christian Ott <[email protected]>

The Pentium4 models 0&1 have a longer MSR_EBC_FREQUENCY_ID register as the models 2&3, so the bit shift must be bigger.

---

 25-akpm/arch/i386/kernel/cpu/cpufreq/speedstep-lib.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)
arch/i386/kernel/cpu/cpufreq/speedstep-lib.c renamed from arch/i386/kernel/cpu/cpufreq/speedstep-lib.c~speedstep-libc-fix-frequency-multiplier-for-pentium4 +4 -1
diff -puN arch/i386/kernel/cpu/cpufreq/speedstep-lib.c~speedstep-libc-fix-frequency-multiplier-for-pentium4 arch/i386/kernel/cpu/cpufreq/speedstep-lib.c
@@ -160,7 +160,10 @@ static unsigned int pentium4_get_frequen
 		printk(KERN_DEBUG "speedstep-lib: couldn't detect FSB speed. Please send an e-mail to <[email protected]>\n");
 
 	/* Multiplier. */
-	mult = msr_lo >> 24;
+	if (c->x86_model < 2)
+		mult = msr_lo >> 27;
+	else
+		mult = msr_lo >> 24;
 
 	dprintk("P4 - FSB %u kHz; Multiplier %u; Speed %u kHz\n", fsb, mult, (fsb * mult));
 

_