Re: 2.4.19-pre10-ac1: Hardcoded cpu_khz in powernow-k6.c

Adrian Bunk (bunk@fs.tum.de)
Wed, 5 Jun 2002 08:04:08 +0200 (CEST)


On Wed, 5 Jun 2002, Dave Jones wrote:

> > while reading through powernow-k6.c in 2.4.19-pre10-ac1 I found the
> > following that seems to be a bug:
> >
> > static unsigned long cpu_khz=350000;
> >
> > Not every K6-2/3 runs at 350 MHz...
>
> iirc, there aren't any MSRs[*] on the K6-2 where we can read
> the current FSB. I think 350MHz was used as it was probably
> the slowest K6-2 to be found at the time. You can override
> it with boot time arguments.

Really? From reading the code I have the impression that cpu_khz holds
more or less the information a "cat /proc/cpuinfo | grep MHz" gives for a
CPU at it's "normal" speed. The only place where cpu_khz is used is in

busfreq = cpu_khz / get_cpu_multiplier() / 1000;

and this gives IMHO a wrong result if the "normal" speed of your CPU is
different from 350 MHz.

> Dave.

cu
Adrian

BTW: 350MHz was never the slowest K6-2, there are K6-2 @ 300 MHz.

-- 

You only think this is a free country. Like the US the UK spends a lot of time explaining its a free country because its a police state. Alan Cox

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/