From: Jon Medhurst (Tixy) Date: Tue, 10 Sep 2013 04:01:44 +0000 (+0800) Subject: ARM: kernel: Fix section mismatches caused by commit bba0859a99 X-Git-Tag: firefly_0821_release~3680^2~158^2~28^2~1 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=98ff17449dd2a9f3bb664120a95ada62d1984acb;p=firefly-linux-kernel-4.4.55.git ARM: kernel: Fix section mismatches caused by commit bba0859a99 Commit bba0859a99 (arm: versatile: don't mark pen as __INIT) introduced the following section mismatch warnings: WARNING: vmlinux.o(.text+0x18208): Section mismatch in reference from the variable pen to the function .cpuinit.text:secondary_startup() WARNING: vmlinux.o(.text+0x18210): Section mismatch in reference from the variable pen to the variable .cpuinit.data:pen_release The first is handled by removing __cpuinitdata from pen_release. This also fixes and potential bug because the issue commit bba0859a99 was aimed at fixing meant a CPU not known to the kernel could be spinning forever in versatile_secondary_startup and polling this pen_release variable, so it is important its memory isn't discarded and reused after boot. The second section mismatch warning is removed by taking __CPUINIT away from before secondary_startup. Signed-off-by: Jon Medhurst Signed-off-by: Alex Shi --- diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 8bac553fe213..2725c87fade6 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S @@ -342,7 +342,6 @@ __turn_mmu_on_loc: .long __turn_mmu_on_end #if defined(CONFIG_SMP) - __CPUINIT ENTRY(secondary_startup) /* * Common entry point for secondary CPUs. diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 5919eb451bb9..7bb63b4ef457 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c @@ -57,7 +57,7 @@ struct secondary_data secondary_data; * control for which core is the next to come out of the secondary * boot "holding pen" */ -volatile int __cpuinitdata pen_release = -1; +volatile int pen_release = -1; enum ipi_msg_type { IPI_WAKEUP,