Skip to contentSkip to conversation

clock speed gone from cpuinfo

PATCH Olaf Hering 1 participant 1 message Jan 18, 2006 PowerPC

lore
Share & tools
lore
#0 lore raw

2.6.16 on 32bit doesnt report the cpu speed anymore, but it still has the bogomips..
chrp_calibrate_decr doesnt seem to set ppc_proc_freq.

lemon:~ # cat /proc/cpuinfo
processor : 0
cpu : 604r
revision : 49.2 (pvr 0009 3102)
bogomips : 41.47
timebase : 20781060
machine : CHRP IBM,7046-B50
lemon:~ # dmesg | grep freq
time_init: decrementer frequency = 20.781060 MHz
time_init: processor frequency = 0.000000 MHz

While looking at generic_calibrate_decr(), cpu and fp are pointers.

 arch/powerpc/kernel/time.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
arch/powerpc/kernel/time.c +4 -4
Index: linux-2.6.16-rc1-olh/arch/powerpc/kernel/time.c
===================================================================
@@ -612,10 +612,10 @@ void __init generic_calibrate_decr(void)
 
 	ppc_tb_freq = DEFAULT_TB_FREQ;		/* hardcoded default */
 	node_found = 0;
-	if (cpu != 0) {
+	if (cpu) {
 		fp = (unsigned int *)get_property(cpu, "timebase-frequency",
 						  NULL);
-		if (fp != 0) {
+		if (fp) {
 			node_found = 1;
 			ppc_tb_freq = *fp;
 		}
@@ -626,10 +626,10 @@ void __init generic_calibrate_decr(void)
 
 	ppc_proc_freq = DEFAULT_PROC_FREQ;
 	node_found = 0;
-	if (cpu != 0) {
+	if (cpu) {
 		fp = (unsigned int *)get_property(cpu, "clock-frequency",
 						  NULL);
-		if (fp != 0) {
+		if (fp) {
 			node_found = 1;
 			ppc_proc_freq = *fp;
 		}
Signature · 2 lines
short story of a lazy sysadmin:
 alias appserv=wotan