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

Olof Johansson olof at lixom.net
Fri May 4 13:15:15 EST 2007


On Wed, May 02, 2007 at 01:48:07AM +0200, Arnd Bergmann wrote:
> On Monday 30 April 2007, 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.
> > 
> > Change the format to three decimals, having full Hz granularity is silly
> > these days. Also specify in output if it's cpufreq or firmware-reported:
> > 
> > clock ? ? ? ? ? : 1250.000MHz (from firmware)
> > or:
> > clock ? ? ? ? ? : 2500.000MHz (actual speed)
> 
> 
> Good idea, but I'd be _very_ careful with changing any field in
> /proc/cpuinfo. Having the extra text in there can easily confuse
> parsers in poorly written user applications, maybe even in good ones ;-)
> 
> How about rather adding a new line in there for one of the fields, either

Yeah, good point. Actually, taking away the extra decimals is maybe a
bad idea as well.

I'll settle for clock/current-clock. See patch posted separately.


Thanks,

Olof



More information about the Linuxppc-dev mailing list