Skip to contentSkip to conversation

i386: fix another modpost warning

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

lore
Share & tools
lore
#0 lore raw

PATCH 2/4 i386: fix another modpost warning

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

WARNING: vmlinux - Section mismatch: reference to .init.data: from .data between 'this_cpu' (at offset 0xc05194d0) and 'cpuinfo_op'

o this_cpu pointer should be of type __cpuinitdata.

---

 arch/i386/kernel/cpu/common.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/i386/kernel/cpu/common.c renamed from arch/i386/kernel/cpu/common.c~misc-vmlinux-modpost-warning-fixes +1 -1
diff -puN arch/i386/kernel/cpu/common.c~misc-vmlinux-modpost-warning-fixes arch/i386/kernel/cpu/common.c
@@ -54,7 +54,7 @@ static struct cpu_dev __cpuinitdata defa
 	.c_init	= default_init,
 	.c_vendor = "Unknown",
 };
-static struct cpu_dev * this_cpu = &default_cpu;
+static struct cpu_dev * this_cpu __cpuinitdata = &default_cpu;
 
 static int __init cachesize_setup(char *str)
 {

_