Hello. Andrew Morton wrote: > umm, actually it's wrong. i386's smp_prepare_boot_cpu() diddles with > per-cpu memory, and that's not initialised at that stage. See the call to > setup_per_cpu_areas() a few lines later. > So I'll drop that hunk. How important is it in practice? It was important because it used to fix both the printk and (completely accidentally!) the boot problem itself. > #ifdef CONFIG_SMP > cpu_set(smp_processor_id(), cpu_online_map); /* comment */ > #endif I don't even think #ifdef is needed. Having that for the UP case may be useless, yet looks consistent to me. > right there in start_kernel()? This is enough for printk but not for the boot lockup. The attached patch is however enough. And it should be correct, as it is consistent with an UP case. > (That assumes that smp_processor_id() works at that stage. Surely that's > true). Looking into the arch-specific code, I can see that some arches evaluate the boot-cpu number by some other means, not by the smp_processor_id(). Still I am pretty sure the patch won't hurt them. With this patch and with the hotfixes, I've got the -mm kernel working, thanks. ---- Register the boot-cpu in the cpu maps earlier to allow the early printk to work, and to fix an obscure deadlock at boot. Signed-off-by: Stas Sergeev