set_dec(tb_ticks_per_jiffy); set_tb(0, 0); last_jiffy_stamp(smp_processor_id()) = 0; 
/* 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); 
void __init smp_core99_give_timebase(void){	unsigned int t;	/* Primary processor waits for secondary to have frozen	 * the timebase, resets local TB, and kick timebase again	 */	/* wait for the secondary to have reset its TB before proceeding */	for (t = 1000; t > 0 && !sec_tb_reset; --t)		udelay(1000);	if (t == 0)		printk(KERN_WARNING "Timeout waiting sync on second CPU\n");       	set_dec(tb_ticks_per_jiffy);	set_tb(0, 0);	last_jiffy_stamp(smp_processor_id()) = 0;	mb();	/* 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);	smp_tb_synchronized = 1;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/6460b4cceba0181308042c8d8794eb679bfa22e5/pmac_smp.c/buggy/arch/ppc/platforms/pmac_smp.c