From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel mailing list <linux-kernel@vger.kernel.org>
Subject: [PATCH] PPC32: Properly register CPUs
Date: 29 Jul 2003 09:45:09 -0400 [thread overview]
Message-ID: <1059486309.8538.28.camel@gaston> (raw)
Hi Linus !
This patch adds proper registration of CPUs on ppc32, without
this, accesses to cpufreq will oops.
Please apply,
Ben.
===== arch/ppc/kernel/setup.c 1.41 vs edited =====
--- 1.41/arch/ppc/kernel/setup.c Tue Jul 22 18:09:26 2003
+++ edited/arch/ppc/kernel/setup.c Tue Jul 29 09:43:17 2003
@@ -572,11 +572,21 @@
}
#endif /* CONFIG_NVRAM */
+static struct cpu cpu_devices[NR_CPUS];
+
int __init ppc_init(void)
{
+ int i;
+
/* clear the progress line */
if ( ppc_md.progress ) ppc_md.progress(" ", 0xffff);
-
+
+ /* register CPU devices */
+ for (i = 0; i < NR_CPUS; i++)
+ if (cpu_possible(i))
+ register_cpu(&cpu_devices[i], i, NULL);
+
+ /* call platform init */
if (ppc_md.init != NULL) {
ppc_md.init();
}
reply other threads:[~2003-07-29 13:45 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=1059486309.8538.28.camel@gaston \
--to=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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