From: Keshavamurthy Anil S <anil.s.keshavamurthy@intel.com>

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.

Signed-off-by: Anil Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/ia64/kernel/smpboot.c |    2 +-
 25-akpm/kernel/fork.c              |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff -puN arch/ia64/kernel/smpboot.c~online-cpu-with-maxcpus-option-panics arch/ia64/kernel/smpboot.c
--- 25/arch/ia64/kernel/smpboot.c~online-cpu-with-maxcpus-option-panics	2004-09-11 16:56:27.325122240 -0700
+++ 25-akpm/arch/ia64/kernel/smpboot.c	2004-09-11 16:56:27.330121480 -0700
@@ -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;
 }
diff -puN kernel/fork.c~online-cpu-with-maxcpus-option-panics kernel/fork.c
--- 25/kernel/fork.c~online-cpu-with-maxcpus-option-panics	2004-09-11 16:56:27.326122088 -0700
+++ 25-akpm/kernel/fork.c	2004-09-11 16:56:27.332121176 -0700
@@ -1068,13 +1068,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;
_