sparc64: Fix UP bootup regression.
authorDavid S. Miller <davem@davemloft.net>
Thu, 18 Jun 2009 08:44:19 +0000 (01:44 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Jun 2009 06:50:41 +0000 (23:50 -0700)
Commit b696fdc259f0d94348a9327bed352fac44d4883d ("sparc64: Defer
cpu_data() setup until end of per-cpu data initialization.") broke
bootup for UP builds because the cpu_data() initialization only
occurs in setup_per_cpu_areas() which is never compiled in nor
called in UP builds.

Fix this up by calling the setups directly from init_64.c when
non-SMP.

Reported-by: Alexander Beregalov <a.beregalov@gmail.com>
Tested-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/mm/init_64.c

index ca92e2f54e4d5bd5f3e2f663ce2056eecb853c7e..ed6be6ba2f4e9f7859c3e34b27fdc8e5ccc6f5ab 100644 (file)
@@ -1796,10 +1796,16 @@ void __init paging_init(void)
 
        prom_build_devicetree();
        of_populate_present_mask();
+#ifndef CONFIG_SMP
+       of_fill_in_cpu_data();
+#endif
 
        if (tlb_type == hypervisor) {
                sun4v_mdesc_init();
                mdesc_populate_present_mask(cpu_all_mask);
+#ifndef CONFIG_SMP
+               mdesc_fill_in_cpu_data(cpu_all_mask);
+#endif
        }
 
        /* Once the OF device tree and MDESC have been setup, we know