/* Setup the PC, SP, and GP of a secondary processor and start it running! smp_bootstrap is the place to resume from __KSTK_TOS(idle) is apparently the stack pointer (unsigned long)idle->thread_info the gp  */
void __cpuinit smtc_boot_secondary(int cpu, struct task_struct *idle)
/* Setup the PC, SP, and GP of a secondary processor and start it running! smp_bootstrap is the place to resume from __KSTK_TOS(idle) is apparently the stack pointer (unsigned long)idle->thread_info the gp  */
void __cpuinit smtc_boot_secondary(int cpu, struct task_struct *idle)
{
	extern u32 kernelsp[NR_CPUS];
	unsigned long flags;
	int mtflags;
	LOCK_MT_PRA();
	if (cpu_data[cpu].vpe_id != cpu_data[smp_processor_id()].vpe_id) {
		dvpe();
	}
	settc(cpu_data[cpu].tc_id);
	write_tc_c0_tcrestart((unsigned long)&smp_bootstrap);
	kernelsp[cpu] = __KSTK_TOS(idle);
	write_tc_gpr_sp(__KSTK_TOS(idle));
	write_tc_gpr_gp((unsigned long)task_thread_info(idle));
	smtc_status |= SMTC_MTC_ACTIVE;
	write_tc_c0_tchalt(0);
	if (cpu_data[cpu].vpe_id != cpu_data[smp_processor_id()].vpe_id) {
		evpe(EVPE_ENABLE);
	}
	UNLOCK_MT_PRA();
}