* [PATCH] arc: kernel: remove '__init' for first_lines_of_secondary()
@ 2013-10-23 2:16 Chen Gang
2013-10-28 13:53 ` Vineet Gupta
0 siblings, 1 reply; 3+ messages in thread
From: Chen Gang @ 2013-10-23 2:16 UTC (permalink / raw)
To: vgupta, Arnd Bergmann, noamc; +Cc: linux-kernel
first_lines_of_secondary() is a '__init' function, but it may be called
by __cpu_up() by _cpu_up() by cpu_up() which is a normal export symbol
function. So recommend to remove '__init'.
The related warning (with allmodconfig):
MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0x315c): Section mismatch in reference from the function __cpu_up() to the function .init.text:first_lines_of_secondary()
The function __cpu_up() references
the function __init first_lines_of_secondary().
This is often because __cpu_up lacks a __init
annotation or the annotation of first_lines_of_secondary is wrong.
Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
arch/arc/include/asm/smp.h | 2 +-
arch/arc/kernel/head.S | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arc/include/asm/smp.h b/arch/arc/include/asm/smp.h
index c4fb211..eefc29f 100644
--- a/arch/arc/include/asm/smp.h
+++ b/arch/arc/include/asm/smp.h
@@ -30,7 +30,7 @@ extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
* APIs provided by arch SMP code to rest of arch code
*/
extern void __init smp_init_cpus(void);
-extern void __init first_lines_of_secondary(void);
+extern void first_lines_of_secondary(void);
extern const char *arc_platform_smp_cpuinfo(void);
/*
diff --git a/arch/arc/kernel/head.S b/arch/arc/kernel/head.S
index 0f944f0..2c878e9 100644
--- a/arch/arc/kernel/head.S
+++ b/arch/arc/kernel/head.S
@@ -95,7 +95,7 @@ stext:
;----------------------------------------------------------------
; First lines of code run by secondary before jumping to 'C'
;----------------------------------------------------------------
- .section .init.text, "ax",@progbits
+ .section .text, "ax",@progbits
.type first_lines_of_secondary, @function
.globl first_lines_of_secondary
--
1.7.7.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] arc: kernel: remove '__init' for first_lines_of_secondary()
2013-10-23 2:16 [PATCH] arc: kernel: remove '__init' for first_lines_of_secondary() Chen Gang
@ 2013-10-28 13:53 ` Vineet Gupta
2013-10-29 1:08 ` Chen Gang
0 siblings, 1 reply; 3+ messages in thread
From: Vineet Gupta @ 2013-10-28 13:53 UTC (permalink / raw)
To: Chen Gang, Arnd Bergmann, noamc; +Cc: linux-kernel
On 10/23/2013 07:46 AM, Chen Gang wrote:
> first_lines_of_secondary() is a '__init' function, but it may be called
> by __cpu_up() by _cpu_up() by cpu_up() which is a normal export symbol
> function. So recommend to remove '__init'.
>
> The related warning (with allmodconfig):
>
> MODPOST vmlinux.o
> WARNING: vmlinux.o(.text+0x315c): Section mismatch in reference from the function __cpu_up() to the function .init.text:first_lines_of_secondary()
> The function __cpu_up() references
> the function __init first_lines_of_secondary().
> This is often because __cpu_up lacks a __init
> annotation or the annotation of first_lines_of_secondary is wrong.
>
>
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
Applied for 3.13. But I'm planning to squash all the __init section annotation
fixes into one patch. OK with you ?
Thx,
-Vineet
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arc: kernel: remove '__init' for first_lines_of_secondary()
2013-10-28 13:53 ` Vineet Gupta
@ 2013-10-29 1:08 ` Chen Gang
0 siblings, 0 replies; 3+ messages in thread
From: Chen Gang @ 2013-10-29 1:08 UTC (permalink / raw)
To: Vineet Gupta; +Cc: Arnd Bergmann, noamc, linux-kernel
On 10/28/2013 09:53 PM, Vineet Gupta wrote:
> On 10/23/2013 07:46 AM, Chen Gang wrote:
>> first_lines_of_secondary() is a '__init' function, but it may be called
>> by __cpu_up() by _cpu_up() by cpu_up() which is a normal export symbol
>> function. So recommend to remove '__init'.
>>
>> The related warning (with allmodconfig):
>>
>> MODPOST vmlinux.o
>> WARNING: vmlinux.o(.text+0x315c): Section mismatch in reference from the function __cpu_up() to the function .init.text:first_lines_of_secondary()
>> The function __cpu_up() references
>> the function __init first_lines_of_secondary().
>> This is often because __cpu_up lacks a __init
>> annotation or the annotation of first_lines_of_secondary is wrong.
>>
>>
>> Signed-off-by: Chen Gang <gang.chen@asianux.com>
>
> Applied for 3.13. But I'm planning to squash all the __init section annotation
> fixes into one patch. OK with you ?
>
It is OK to me. They are all related with each other, although toolchain
reports several warnings (originally, I made them based on warning items).
Thanks.
--
Chen Gang
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-29 1:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-23 2:16 [PATCH] arc: kernel: remove '__init' for first_lines_of_secondary() Chen Gang
2013-10-28 13:53 ` Vineet Gupta
2013-10-29 1:08 ` Chen Gang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).