From: Olaf Hering <olh@suse.de>
To: linuxppc-dev@ozlabs.org
Subject: clock speed gone from cpuinfo
Date: Wed, 18 Jan 2006 21:23:57 +0100 [thread overview]
Message-ID: <20060118202357.GA341@suse.de> (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(-)
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
reply other threads:[~2006-01-18 20:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060118202357.GA341@suse.de \
--to=olh@suse.de \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).