Skip to contentSkip to conversation

idle_regs() must be __cpuinit

PATCH New Adrian Bunk 1 participant 1 message Dec 11, 2007

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 idle_regs() must be __cpuinit

This patch fixes the following section mismatch with CONFIG_HOTPLUG=n, CONFIG_HOTPLUG_CPU=y:

<-- snip -->

...
WARNING: vmlinux.o(.text+0x399a6): Section mismatch: reference to .init.text.5:idle_regs (between 'fork_idle' and 'get_task_mm')
...

<-- snip -->

---

 arch/ia64/kernel/smpboot.c   |    2 +-
 arch/x86/kernel/cpu/common.c |    2 +-
 kernel/fork.c                |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

f89f74bbd2770a692e7efd8b4a50a063418759b7

arch/ia64/kernel/smpboot.c +1 -1
index 5f6f47d..f091761 100644
@@ -476,7 +476,7 @@ start_secondary (void *unused)
 	return 0;
 }
 
-struct pt_regs * __devinit idle_regs(struct pt_regs *regs)
+struct pt_regs * __cpuinit idle_regs(struct pt_regs *regs)
 {
 	return NULL;
 }
arch/x86/kernel/cpu/common.c +1 -1
index e2fcf20..590d4c3 100644
@@ -631,7 +631,7 @@ void __init early_cpu_init(void)
 }
 
 /* Make sure %fs is initialized properly in idle threads */
-struct pt_regs * __devinit idle_regs(struct pt_regs *regs)
+struct pt_regs * __cpuinit idle_regs(struct pt_regs *regs)
 {
 	memset(regs, 0, sizeof(struct pt_regs));
 	regs->xfs = __KERNEL_PERCPU;
kernel/fork.c +1 -1
index 8dd8ff2..2c12ce5 100644
@@ -1359,7 +1359,7 @@ fork_out:
 	return ERR_PTR(retval);
 }
 
-noinline struct pt_regs * __devinit __attribute__((weak)) idle_regs(struct pt_regs *regs)
+noinline struct pt_regs * __cpuinit __attribute__((weak)) idle_regs(struct pt_regs *regs)
 {
 	memset(regs, 0, sizeof(struct pt_regs));
 	return regs;