for (t = 100000; t > 0 && sec_tb_reset; --t) udelay(10); 
/* note: can't use udelay here, since it needs the timebase running */ for (t = 10000000; t > 0 && sec_tb_reset; --t) barrier(); 
void smp_core99_give_timebase(void){	unsigned long flags;	unsigned int t;	/* wait for the secondary to be in take_timebase */	for (t = 100000; t > 0 && !sec_tb_reset; --t)		udelay(10);	if (!sec_tb_reset) {		printk(KERN_WARNING "Timeout waiting sync on second CPU\n");		return;	}	/* freeze the timebase and read it */	/* disable interrupts so the timebase is disabled for the	   shortest possible time */	local_irq_save(flags);	pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, core99_tb_gpio, 4);	pmac_call_feature(PMAC_FTR_READ_GPIO, NULL, core99_tb_gpio, 0);	mb();	pri_tb_hi = get_tbu();	pri_tb_lo = get_tbl();	pri_tb_stamp = last_jiffy_stamp(smp_processor_id());	mb();	/* tell the secondary we're ready */	sec_tb_reset = 2;	mb();	/* wait for the secondary to have taken it */	for (t = 100000; t > 0 && sec_tb_reset; --t)		udelay(10);	if (sec_tb_reset)		/* XXX BUG_ON here? */		printk(KERN_WARNING "Timeout waiting sync(2) on second CPU\n");	/* Now, restart the timebase by leaving the GPIO to an open collector */       	pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, core99_tb_gpio, 0);        pmac_call_feature(PMAC_FTR_READ_GPIO, NULL, core99_tb_gpio, 0);	local_irq_restore(flags);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/54c4e6b5fee0347ab81e2c2fe4239c455c3422ae/smp.c/clean/arch/powerpc/platforms/powermac/smp.c