public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: setup_trampoline() - fix section mismatch warning
@ 2008-04-10 19:16 Jacek Luczak
  2008-04-11  9:03 ` Ingo Molnar
  2008-04-11 17:50 ` Sam Ravnborg
  0 siblings, 2 replies; 5+ messages in thread
From: Jacek Luczak @ 2008-04-10 19:16 UTC (permalink / raw)
  To: Ingo Molnar, LKML, tglx

[-- Attachment #1: Type: text/plain, Size: 1510 bytes --]

Hi Ingo,

this patch fixes section mismatch warnings (on x86_64 host) in setup_trampoline(),
which was referencing __initdata variables trampoline_data and trampoline_end.

Patch is against x86/latest.

Warning messages:
WARNING: arch/x86/kernel/built-in.o(.cpuinit.text+0x2b6a): Section mismatch in reference from the function setup_trampoline()
to the variable .init.data:trampoline_data
The function __cpuinit setup_trampoline() references
a variable __initdata trampoline_data.
If trampoline_data is only used by setup_trampoline then
annotate trampoline_data with a matching annotation.

WARNING: arch/x86/kernel/built-in.o(.cpuinit.text+0x2b71): Section mismatch in reference from the function setup_trampoline()
to the variable .init.data:trampoline_end
The function __cpuinit setup_trampoline() references
a variable __initdata trampoline_end.
If trampoline_end is only used by setup_trampoline then
annotate trampoline_end with a matching annotation. 

-Jacek

PS: Hope that my email client won't break patch this time. In case it does - patch attached.

---

diff --git a/arch/x86/kernel/trampoline_64.S b/arch/x86/kernel/trampoline_64.S
index 4aedd0b..2a07e67 100644
--- a/arch/x86/kernel/trampoline_64.S
+++ b/arch/x86/kernel/trampoline_64.S
@@ -32,7 +32,7 @@
 
 /* We can free up trampoline after bootup if cpu hotplug is not supported. */
 #ifndef CONFIG_HOTPLUG_CPU
-.section .init.data, "aw", @progbits
+.section .cpuinit.data, "aw", @progbits
 #else
 .section .rodata, "a", @progbits
 #endif


[-- Attachment #2: setup_trampoline-fix_section_mismatch.patch --]
[-- Type: text/plain, Size: 440 bytes --]

diff --git a/arch/x86/kernel/trampoline_64.S b/arch/x86/kernel/trampoline_64.S
index 4aedd0b..2a07e67 100644
--- a/arch/x86/kernel/trampoline_64.S
+++ b/arch/x86/kernel/trampoline_64.S
@@ -32,7 +32,7 @@
 
 /* We can free up trampoline after bootup if cpu hotplug is not supported. */
 #ifndef CONFIG_HOTPLUG_CPU
-.section .init.data, "aw", @progbits
+.section .cpuinit.data, "aw", @progbits
 #else
 .section .rodata, "a", @progbits
 #endif

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-04-12 16:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-10 19:16 [PATCH] x86: setup_trampoline() - fix section mismatch warning Jacek Luczak
2008-04-11  9:03 ` Ingo Molnar
2008-04-11 17:50 ` Sam Ravnborg
2008-04-12 11:00   ` Jacek Luczak
2008-04-12 16:56     ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox