Re: lost cpufreq (Re: Linux v2.6.18-rc1)

Dave Jones
2006-07-07T19:07:43Z

On Fri, Jul 07, 2006 at 07:52:39PM +0200, Tomasz Torcz wrote:
> On Wed, Jul 05, 2006 at 09:26:35PM -0700, Linus Torvalds wrote:
> >
> > Ok,
> > the merge window for 2.6.18 is closed, and -rc1 is out there
>
> ... and cpufreq-nforce2.ko fails to work. Module can't be loaded:
> FATAL: Error inserting cpufreq_nforce2
> (/lib/modules/2.6.18-rc1/kernel/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.ko):
> Device or resource busy
>
> Here's relevant difference between dmesg of 2.6.17 and 2.6.18-rc1:
>
> @@ -244,7 +240,6 @@
> lp: driver loaded but no devices found
> cpufreq: Detected nForce2 chipset revision C1
> cpufreq: FSB changing is maybe unstable and can lead to crashes and data loss.
> -cpufreq: FSB currently at 165 MHz, FID 10.5
> usbcore: registered new driver usbfs
> usbcore: registered new driver hub

Does it work again if you apply this patch with -R ?

Dave

diff --git a/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c b/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c
index f275e0d..0d49d73 100644
--- a/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c
+++ b/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c
@@ -90,7 +90,7 @@ static int nforce2_calc_pll(unsigned int

/* Try to calculate multiplier and divider up to 4 times */
while (((mul == 0) || (div == 0)) && (tried <= 3)) {
- for (xdiv = 1; xdiv <= 0x80; xdiv++)
+ for (xdiv = 2; xdiv <= 0x80; xdiv++)
for (xmul = 1; xmul <= 0xfe; xmul++)
if (nforce2_calc_fsb(NFORCE2_PLL(xmul, xdiv)) ==
fsb + tried) {

--