Skip to contentSkip to conversation

Online CPU with maxcpus option panics

PATCH New Keshavamurthy Anil S 1 participant 1 message Sep 11, 2004

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

PATCH 1/1 Online CPU with maxcpus option panics

Hi Andrew,
I booted IA64 kernel with "maxcpus=" set to less than
the total available processors in the system. Then I tried to online the CPU which was offline due to "maxcpus=" restirction. i.e when I tried to online the CPU which never was online at boot crashed the system.

Attached patch fixes the problem.

Please apply.

---

 linux-2.6.9-rc1-mm2-askeshav/arch/ia64/kernel/smpboot.c |    2 +-
 linux-2.6.9-rc1-mm2-askeshav/kernel/fork.c              |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
arch/ia64/kernel/smpboot.c renamed from arch/ia64/kernel/smpboot.c~maxcpufix +1 -1
diff -puN arch/ia64/kernel/smpboot.c~maxcpufix arch/ia64/kernel/smpboot.c
@@ -356,7 +356,7 @@ start_secondary (void *unused)
 	return cpu_idle();
 }
 
-struct pt_regs * __init idle_regs(struct pt_regs *regs)
+struct pt_regs * __devinit idle_regs(struct pt_regs *regs)
 {
 	return NULL;
 }
kernel/fork.c renamed from kernel/fork.c~maxcpufix +2 -2
diff -puN kernel/fork.c~maxcpufix kernel/fork.c
@@ -1069,13 +1069,13 @@ bad_fork_free:
 	goto fork_out;
 }
 
-struct pt_regs * __init __attribute__((weak)) idle_regs(struct pt_regs *regs)
+struct pt_regs * __devinit __attribute__((weak)) idle_regs(struct pt_regs *regs)
 {
 	memset(regs, 0, sizeof(struct pt_regs));
 	return regs;
 }
 
-task_t * __init fork_idle(int cpu)
+task_t * __devinit fork_idle(int cpu)
 {
 	task_t *task;
 	struct pt_regs regs;

_