x86,APIC: Fix false positive section mismatch in numaq_32.c
PATCH 1/1 x86,APIC: Fix false positive section mismatch in numaq_32.c
Impact: Fix false positive warning.
The variable apic_numaq placed in noninit section references the function wakeup_secondary_cpu_via_nmi(), which is in __cpuinit section. Thus causes a section mismatch warning. To avoid such mismatch we mark apic_numaq as __refdata.
We were warned by following warning:
WARNING: arch/x86/kernel/built-in.o(.data+0x932c): Section mismatch in reference from the variable apic_numaq to the function .cpuinit.text:wakeup_secondary_cpu_via_nmi()
The variable apic_numaq references
the function __cpuinit wakeup_secondary_cpu_via_nmi()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
---
arch/x86/kernel/apic/numaq_32.c +2 -1
@@ -493,7 +493,8 @@ static void numaq_setup_portio_remap(voi (u_long) xquad_portio, (u_long) num_quads*XQUAD_PORTIO_QUAD); } -struct apic apic_numaq = { +/* Use __refdata to keep false positive warning calm. */ +struct apic __refdata apic_numaq = { .name ="NUMAQ" , .probe = probe_numaq,
[tip:x86/urgent] x86, apic: Fix false positive section mismatch in numaq_32.c
Commit-ID: 7473727be884293c8171775a148e1d174d1606e6 Gitweb: http://git.kernel.org/tip/7473727be884293c8171775a148e1d174d1606e6 Author: Rakib Mullick <[email protected]> AuthorDate: Sun, 12 Jul 2009 17:07:19 +0600 Committer: Ingo Molnar <[email protected]> CommitDate: Mon, 13 Jul 2009 11:03:27 +0200
x86, apic: Fix false positive section mismatch in numaq_32.c
The variable apic_numaq placed in noninit section references the function wakeup_secondary_cpu_via_nmi(), which is in __cpuinit section. Thus causes a section mismatch warning. To avoid such mismatch we mark apic_numaq as __refdata.
We were warned by the following warning:
WARNING: arch/x86/kernel/built-in.o(.data+0x932c): Section mismatch in reference from the variable apic_numaq to the function .cpuinit.text:wakeup_secondary_cpu_via_nmi()
LKML-Reference: <[email protected]>
--- arch/x86/kernel/apic/numaq_32.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/x86/kernel/apic/numaq_32.c +2 -1
@@ -493,7 +493,8 @@ static void numaq_setup_portio_remap(void) (u_long) xquad_portio, (u_long) num_quads*XQUAD_PORTIO_QUAD); } -struct apic apic_numaq = { +/* Use __refdata to keep false positive warning calm. */ +struct apic __refdata apic_numaq = { .name ="NUMAQ" , .probe = probe_numaq,