]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - arch/powerpc/kernel/setup_64.c
powerpc: Unify the 32 and 64 bit idle loops
[mirror_ubuntu-zesty-kernel.git] / arch / powerpc / kernel / setup_64.c
index a717dff695ef28f09302c1690b13c921ac09dc02..5b63a861ef4386423da8f6f4dc8a8a90a882bdb6 100644 (file)
@@ -73,7 +73,6 @@
 
 int have_of = 1;
 int boot_cpuid = 0;
-int boot_cpuid_phys = 0;
 dev_t boot_dev;
 u64 ppc64_pft_size;
 
@@ -208,7 +207,6 @@ static struct machdep_calls __initdata *machines[] = {
 
 void __init early_setup(unsigned long dt_ptr)
 {
-       struct paca_struct *lpaca = get_paca();
        static struct machdep_calls **mach;
 
        /* Enable early debugging if any specified (see udbg.h) */
@@ -223,6 +221,14 @@ void __init early_setup(unsigned long dt_ptr)
         */
        early_init_devtree(__va(dt_ptr));
 
+       /* Now we know the logical id of our boot cpu, setup the paca. */
+       setup_boot_paca();
+
+       /* Fix up paca fields required for the boot cpu */
+       get_paca()->cpu_start = 1;
+       get_paca()->stab_real = __pa((u64)&initial_stab);
+       get_paca()->stab_addr = (u64)&initial_stab;
+
        /*
         * Iterate all ppc_md structures until we find the proper
         * one for the current machine type
@@ -260,7 +266,7 @@ void __init early_setup(unsigned long dt_ptr)
                if (cpu_has_feature(CPU_FTR_SLB))
                        slb_initialize();
                else
-                       stab_initialize(lpaca->stab_real);
+                       stab_initialize(get_paca()->stab_real);
        }
 
        DBG(" <- early_setup()\n");
@@ -311,8 +317,6 @@ void smp_release_cpus(void)
 
        DBG(" <- smp_release_cpus()\n");
 }
-#else
-#define smp_release_cpus()
 #endif /* CONFIG_SMP || CONFIG_KEXEC */
 
 /*
@@ -473,10 +477,12 @@ void __init setup_system(void)
        check_smt_enabled();
        smp_setup_cpu_maps();
 
+#ifdef CONFIG_SMP
        /* Release secondary cpus out of their spinloops at 0x60 now that
         * we can map physical -> logical CPU ids
         */
        smp_release_cpus();
+#endif
 
        printk("Starting Linux PPC64 %s\n", system_utsname.version);
 
@@ -497,8 +503,6 @@ void __init setup_system(void)
 #endif
        printk("-----------------------------------------------------\n");
 
-       mm_init_ppc64();
-
        DBG(" <- setup_system()\n");
 }
 
@@ -603,12 +607,6 @@ void __init setup_arch(char **cmdline_p)
 
        ppc_md.setup_arch();
 
-       /* Use the default idle loop if the platform hasn't provided one. */
-       if (NULL == ppc_md.idle_loop) {
-               ppc_md.idle_loop = default_idle;
-               printk(KERN_INFO "Using default idle loop\n");
-       }
-
        paging_init();
        ppc64_boot_msg(0x15, "Setup Done");
 }