This patch adds proper registration of CPUs on ppc32, without
this, accesses to cpufreq will oops.



 25-akpm/arch/ppc/kernel/setup.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletion(-)

diff -puN arch/ppc/kernel/setup.c~ppc32-cpu-registration-fix arch/ppc/kernel/setup.c
--- 25/arch/ppc/kernel/setup.c~ppc32-cpu-registration-fix	Tue Jul 29 13:41:25 2003
+++ 25-akpm/arch/ppc/kernel/setup.c	Tue Jul 29 13:41:25 2003
@@ -572,11 +572,21 @@ nvram_write_byte(unsigned char val, int 
 }
 #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();
 	}

_