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

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

Post by Adrian Bun » Thu, 06 Jun 2002 10:00:10



Hi Dave,

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...

cu
Adrian

--

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

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

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

Post by Dave Jone » Thu, 06 Jun 2002 10:10:12


 > Hi Dave,
 >
 > 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.

    Dave.

[*] The K6 style powernow was reverse engineered, as there were
no publically available documents explaining it. All we can
do is scale multipliers. No voltage scaling, no FSB decoding.

--
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

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

Post by Adrian Bun » Thu, 06 Jun 2002 15:10:07



>  > 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.

Quote:>     Dave.

cu
Adrian


--

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

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/