On 09/11/2013 12:04 AM, Mark Brown wrote:
On 10 September 2013 16:26, Alex Shi <alex.shi@linaro.org mailto:alex.shi@linaro.org> wrote:
Thanks a lot, Mark. Will try to cherry-pick related commit on greg's tree first tomorrow. and talk this issue with Greg. If the reason is like your guess. :) we can do the second solution.
OK. Please keep me in the CCs if you mail Greg, and it probably makes sense to loop in the original author too.
Hi Mark, As your estimation, related upstream commits have much problems to apply on Greg's 3.10 stable kernel.
So, I apply Tixy's patch on lsk-v3.10 branch of lsk. and tested compilation. That's fine. Is there some way to let me push the change to lsk. or let me put the change on a git.linaro.org and then You pull my tree for this change?
---
From 2ba254d32cee6c1df4636c6173c924d16c40948c Mon Sep 17 00:00:00 2001
From: "Jon Medhurst (Tixy)" tixy@linaro.org Date: Tue, 10 Sep 2013 12:01:44 +0800 Subject: [PATCH] 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 tixy@linaro.org Signed-off-by: Alex Shi alex.shi@linaro.org --- arch/arm/kernel/head.S | 1 - arch/arm/kernel/smp.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 8bac553..2725c87 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 dc05ca7..46e8ab3 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,