Skip to contentSkip to conversation

i386: Fix modpost warning in SMP trampoline code

PATCH New Vivek Goyal 1 participant 1 message Jan 3, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 i386: Fix modpost warning in SMP trampoline code

o MODPOST generates warning for i386 if kernel is compiled with CONFIG_RELOCATABLE=y

WARNING: vmlinux - Section mismatch: reference to .init.text:startup_32_smp from .data between 'trampoline_data' (at offset 0xc0519cf8) and 'boot_gdt'

o trampoline code/data can go into init section is CPU hotplug is not enabled.

---

 arch/i386/kernel/trampoline.S |    5 +++++
 1 file changed, 5 insertions(+)
arch/i386/kernel/trampoline.S renamed from arch/i386/kernel/trampoline.S~i386-fix-modpost-warning-in-smp-trampoline-code +5 -0
diff -puN arch/i386/kernel/trampoline.S~i386-fix-modpost-warning-in-smp-trampoline-code arch/i386/kernel/trampoline.S
@@ -38,6 +38,11 @@
 
 .data
 
+/* We can free up trampoline after bootup if cpu hotplug is not supported. */
+#ifndef CONFIG_HOTPLUG_CPU
+.section ".init.data","aw",@progbits
+#endif
+
 .code16
 
 ENTRY(trampoline_data)

_