#include <asm/cpu.h>
#include <asm/processor.h>
#include <asm/system.h>
-#include <asm/hardirq.h>
#include <asm/mmu_context.h>
#include <asm/smp.h>
cpu_set(0, cpu_callin_map);
}
-static struct task_struct * __init fork_by_hand(void)
-{
- struct pt_regs regs;
- /*
- * don't care about the eip and regs settings since
- * we'll never reschedule the forked task.
- */
- return copy_process(CLONE_VM|CLONE_IDLETASK, 0, ®s, 0, NULL, NULL);
-}
-
/*
* Startup the CPU with this logical number
*/
* The following code is purely to make sure
* Linux can schedule processes on this slave.
*/
- idle = fork_by_hand();
+ idle = fork_idle(cpu);
if (IS_ERR(idle))
panic("failed fork for CPU %d\n", cpu);
- wake_up_forked_process(idle);
-
- /*
- * We remove it from the pidhash and the runqueue once we've
- * got the process:
- */
- init_idle(idle, cpu);
-
- unhash_process(idle);
-
prom_boot_secondary(cpu, idle);
/* XXXKW timeout */