/* create a process for the processor */ /* only regs.msr is actually used, and 0 is OK for it */ p = fork_idle(cpu); if (IS_ERR(p)) panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p)); secondary_ti = p->thread_info; p->thread_info->cpu = cpu; 
secondary_ti = idle_tasks[cpu]->thread_info; mb(); 
int __cpu_up(unsigned int cpu){	struct task_struct *p;	char buf[32];	int c;	/* create a process for the processor */	/* only regs.msr is actually used, and 0 is OK for it */	p = fork_idle(cpu);	if (IS_ERR(p))		panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p));	secondary_ti = p->thread_info;	p->thread_info->cpu = cpu;	/*	 * There was a cache flush loop here to flush the cache	 * to memory for the first 8MB of RAM.  The cache flush	 * has been pushed into the kick_cpu function for those	 * platforms that need it.	 */	/* wake up cpu */	smp_ops->kick_cpu(cpu);		/*	 * wait to see if the cpu made a callin (is actually up).	 * use this value that I found through experimentation.	 * -- Cort	 */	for (c = 1000; c && !cpu_callin_map[cpu]; c--)		udelay(100);	if (!cpu_callin_map[cpu]) {		sprintf(buf, "didn't find cpu %u", cpu);		if (ppc_md.progress) ppc_md.progress(buf, 0x360+cpu);		printk("Processor %u is stuck.\n", cpu);		return -ENOENT;	}	sprintf(buf, "found cpu %u", cpu);	if (ppc_md.progress) ppc_md.progress(buf, 0x350+cpu);	printk("Processor %d found.\n", cpu);	smp_ops->give_timebase();	cpu_set(cpu, cpu_online_map);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/31139971b3dc9fbb2e8a8572fb81e6e8470f363a/smp.c/buggy/arch/ppc/kernel/smp.c