lkml.org 
[lkml]   [2003]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] PPC32: Properly register CPUs
From
Date
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();
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.043 / U:2.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site