Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 15 Jun 2007 14:46:36 +0000 (07:46 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 15 Jun 2007 14:46:36 +0000 (07:46 -0700)
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Fix console output getting dropped on platforms without udbg_putc
  [POWERPC] Fix per-cpu allocation on oldworld SMP powermacs

arch/powerpc/kernel/udbg.c
arch/powerpc/platforms/powermac/setup.c
arch/powerpc/platforms/powermac/smp.c

index 87703df87509031c6b163065a7afd08cb56ca593..cbca1df8bc60f996edb343bf86a6944ecfdae108 100644 (file)
@@ -151,12 +151,18 @@ static struct console udbg_console = {
 
 static int early_console_initialized;
 
-/* called by setup_system */
+/*
+ * Called by setup_system after ppc_md->probe and ppc_md->early_init.
+ * Call it again after setting udbg_putc in ppc_md->setup_arch.
+ */
 void register_early_udbg_console(void)
 {
        if (early_console_initialized)
                return;
 
+       if (!udbg_putc)
+               return;
+
        if (strstr(boot_command_line, "udbg-immortal")) {
                printk(KERN_INFO "early console immortal !\n");
                udbg_console.flags &= ~CON_BOOT;
index 07b1c4ec428d590daa4882638118dbee161a343c..956571526a57bcc4169dafc3d7c74ff4b0a7dbaa 100644 (file)
@@ -363,8 +363,19 @@ static void __init pmac_setup_arch(void)
                smp_ops = &core99_smp_ops;
        }
 #ifdef CONFIG_PPC32
-       else
+       else {
+               /*
+                * We have to set bits in cpu_possible_map here since the
+                * secondary CPU(s) aren't in the device tree, and
+                * setup_per_cpu_areas only allocates per-cpu data for
+                * CPUs in the cpu_possible_map.
+                */
+               int cpu;
+
+               for (cpu = 1; cpu < 4 && cpu < NR_CPUS; ++cpu)
+                       cpu_set(cpu, cpu_possible_map);
                smp_ops = &psurge_smp_ops;
+       }
 #endif
 #endif /* CONFIG_SMP */
 
index 686ed82bde79a6608abcf5915848a47a6ff8ffc8..cb2d894541c642609d3e9f408fd91484daa99fa4 100644 (file)
@@ -317,7 +317,6 @@ static int __init smp_psurge_probe(void)
                ncpus = NR_CPUS;
        for (i = 1; i < ncpus ; ++i) {
                cpu_set(i, cpu_present_map);
-               cpu_set(i, cpu_possible_map);
                set_hard_smp_processor_id(i, i);
        }