[PATCH] powerpc: Show current speed in /proc/cpuinfo

Olof Johansson olof at lixom.net
Sat Apr 28 03:51:38 EST 2007


On Fri, Apr 27, 2007 at 07:24:38PM +1000, Benjamin Herrenschmidt wrote:
> On Fri, 2007-04-27 at 03:41 -0500, Olof Johansson wrote:
> > On other architectures, the frequency in /proc/cpuinfo moves with cpufreq
> > changes. It makes sense to do the same on powerpc to keep users from
> > getting confused. Fall back to old ppc_proc_freq for non-cpufreq systems.
> > 
> > Also change the format to three decimals, having full Hz granularity is
> > silly these days.
> 
> That doesn't work if cpufreq is a module... on mac, I used to have
> exactly that hack, though at one point I changed to just updating
> ppc_proc_freq :-) But then, it's easy because I only change the freq on
> all CPUs at the same time. Might be different for you.

CONFIG_CPU_FREQ is a bool. do you mean the cpufreq driver?

I could change the output to be:

clock	:	xxxx.000MHz  (current speed)

and

clock	:	xxxx.000MHz  (reported by firmware)


depending on how I get the info.


-Olof



More information about the Linuxppc-dev mailing list