All of lore.kernel.org
 help / color / mirror / Atom feed
* clock speed gone from cpuinfo
@ 2006-01-18 20:23 Olaf Hering
  0 siblings, 0 replies; only message in thread
From: Olaf Hering @ 2006-01-18 20:23 UTC (permalink / raw)
  To: linuxppc-dev


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(-)

Index: linux-2.6.16-rc1-olh/arch/powerpc/kernel/time.c
===================================================================
--- linux-2.6.16-rc1-olh.orig/arch/powerpc/kernel/time.c
+++ 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;
 		}

-- 
short story of a lazy sysadmin:
 alias appserv=wotan

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-01-18 20:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-18 20:23 clock speed gone from cpuinfo Olaf Hering

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.