Messages in this thread Patch in this message | | | Subject | [PATCH] PPC32: Properly register CPUs | From | Benjamin Herrenschmidt <> | Date | 29 Jul 2003 09:45:09 -0400 |
| |
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/
| |