Merge remote-tracking branch 'lsk/v3.10/topic/arm64-misc' into linux-linaro-lsk
[firefly-linux-kernel-4.4.55.git] / arch / arm64 / kernel / smp.c
index bd68d67d7da49e1f327a91fc3f1294d04b927a58..6b000121618997128608295ae569b2ab2e6b32a6 100644 (file)
@@ -155,13 +155,13 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
        if (cpu_ops[cpu]->cpu_postboot)
                cpu_ops[cpu]->cpu_postboot();
 
-       smp_store_cpu_info(cpu);
-
        /*
         * Enable GIC and timers.
         */
        notify_cpu_starting(cpu);
 
+       smp_store_cpu_info(cpu);
+
        /*
         * OK, now it's safe to let the boot CPU continue.  Wait for
         * the CPU migration code to notice that the CPU is online
@@ -173,6 +173,9 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
        local_irq_enable();
        local_fiq_enable();
 
+       local_irq_enable();
+       local_fiq_enable();
+
        /*
         * OK, it's off to the idle thread for us
         */
@@ -408,7 +411,6 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
 
        smp_store_cpu_info(smp_processor_id());
 
-
        /*
         * are we trying to boot more cores than exist?
         */
@@ -478,7 +480,7 @@ void show_ipi_list(struct seq_file *p, int prec)
        for (i = 0; i < NR_IPI; i++) {
                seq_printf(p, "%*s%u:%s", prec - 1, "IPI", i + IPI_RESCHEDULE,
                           prec >= 4 ? " " : "");
-               for_each_present_cpu(cpu)
+               for_each_online_cpu(cpu)
                        seq_printf(p, "%10u ",
                                   __get_irq_stat(cpu, ipi_irqs[i]));
                seq_printf(p, "      %s\n", ipi_types[i]);