Online CPU with maxcpus option panics
Subsystems (3)
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.
Signed-off-by Anil Keshavamurthy <[email protected]>
---
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
@@ -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
@@ -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;
_