linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PPC32: Properly register CPUs
@ 2003-07-29 13:45 Benjamin Herrenschmidt
  0 siblings, 0 replies; only message in thread
From: Benjamin Herrenschmidt @ 2003-07-29 13:45 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel mailing list

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



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

only message in thread, other threads:[~2003-07-29 13:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-29 13:45 [PATCH] PPC32: Properly register CPUs Benjamin Herrenschmidt

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