Messages in this thread Patch in this message | | | From | "Srivatsa S. Bhat" <> | Subject | [PATCH 19/27] blackfin, smpboot: Use generic SMP booting infrastructure | Date | Fri, 01 Jun 2012 14:44:40 +0530 |
| |
From: Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com>
Convert blackfin to use the generic framework to boot secondary CPUs.
Notes: The call to set_cpu_online() is removed from platform_secondary_init(), since it will now be done by generic SMP booting code.
Signed-off-by: Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Bob Liu <lliubbo@gmail.com> Cc: Steven Miao <realmz6@gmail.com> Cc: Yong Zhang <yong.zhang0@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: uclinux-dist-devel@blackfin.uclinux.org Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> ---
arch/blackfin/mach-bf561/smp.c | 1 - arch/blackfin/mach-common/smp.c | 16 +++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/arch/blackfin/mach-bf561/smp.c b/arch/blackfin/mach-bf561/smp.c index ab1c617..e7e2e50 100644 --- a/arch/blackfin/mach-bf561/smp.c +++ b/arch/blackfin/mach-bf561/smp.c @@ -69,7 +69,6 @@ void __cpuinit platform_secondary_init(unsigned int cpu) SSYNC(); /* We are done with local CPU inits, unblock the boot CPU. */ - set_cpu_online(cpu, true); spin_lock(&boot_lock); spin_unlock(&boot_lock); } diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c index 00bbe67..9ee6f2f 100644 --- a/arch/blackfin/mach-common/smp.c +++ b/arch/blackfin/mach-common/smp.c @@ -25,6 +25,7 @@ #include <linux/irq.h> #include <linux/slab.h> #include <linux/atomic.h> +#include <linux/smpboot.h> #include <asm/cacheflush.h> #include <asm/irq_handler.h> #include <asm/mmu_context.h> @@ -373,6 +374,11 @@ static void __cpuinit setup_secondary(unsigned int cpu) void __cpuinit secondary_start_kernel(void) { + smpboot_start_secondary(NULL); +} + +void __cpuinit __cpu_pre_starting(void *unused) +{ unsigned int cpu = smp_processor_id(); struct mm_struct *mm = &init_mm; @@ -405,8 +411,6 @@ void __cpuinit secondary_start_kernel(void) atomic_inc(&mm->mm_count); current->active_mm = mm; - preempt_disable(); - setup_secondary(cpu); platform_secondary_init(cpu); @@ -414,19 +418,17 @@ void __cpuinit secondary_start_kernel(void) /* setup local core timer */ bfin_local_timer_setup(); - local_irq_enable(); - bfin_setup_caches(cpu); +} - notify_cpu_starting(cpu); +void __cpuinit __cpu_pre_online(void *unused) +{ /* * Calibrate loops per jiffy value. * IRQs need to be enabled here - D-cache can be invalidated * in timer irq handler, so core B can read correct jiffies. */ calibrate_delay(); - - cpu_idle(); } void __init smp_prepare_boot_cpu(void)
| |