From f6edc6c6c0a9ccb07df875d80d295f15a1bc35e6 Mon Sep 17 00:00:00 2001 From: Andrei Warkentin Date: Tue, 21 Dec 2010 16:46:09 -0600 Subject: [PATCH] ARM SMP: Do early platform init on entering secondary_start_kernel. Given the upcoming SMP patches, which will let secondary_startup be used for starting up secondaries, this will let secondary_start_kernel synchronize with boot_secondary, so the later knows the CPU came up. It can be also used to implement a holding pen, in case of a timeout inside boot_secondary, so that the CPU can be safely killed (via hardware). Change-Id: Iff0a25bfef61765f8ecbefe2cceb54066f8dd64f Signed-off-by: Andrei Warkentin --- arch/arm/kernel/smp.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 40dc74f..b677fc5 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c @@ -248,6 +248,11 @@ void __ref cpu_die(void) } #endif /* CONFIG_HOTPLUG_CPU */ +void __cpuinit __attribute__ ((weak)) +platform_secondary_preinit(unsigned int cpu) +{ +} + /* * This is the secondary CPU boot entry. We're using this CPUs * idle thread stack, but a set of temporary page tables. @@ -257,6 +262,7 @@ asmlinkage void __cpuinit secondary_start_kernel(void) struct mm_struct *mm = &init_mm; unsigned int cpu = smp_processor_id(); + platform_secondary_preinit(cpu); printk("CPU%u: Booted secondary processor\n", cpu); /* -- 1.7.0.4