if ( ppc_md.set_rtc_time && (time_status & STA_UNSYNC) == 0 && 
if ( ppc_md.set_rtc_time && ntp_synced() && 
void timer_interrupt(struct pt_regs * regs){	int next_dec;	unsigned long cpu = smp_processor_id();	unsigned jiffy_stamp = last_jiffy_stamp(cpu);	extern void do_IRQ(struct pt_regs *);	if (atomic_read(&ppc_n_lost_interrupts) != 0)		do_IRQ(regs);	irq_enter();	while ((next_dec = tb_ticks_per_jiffy - tb_delta(&jiffy_stamp)) <= 0) {		jiffy_stamp += tb_ticks_per_jiffy;				profile_tick(CPU_PROFILING, regs);		update_process_times(user_mode(regs));	  	if (smp_processor_id())			continue;		/* We are in an interrupt, no need to save/restore flags */		write_seqlock(&xtime_lock);		tb_last_stamp = jiffy_stamp;		do_timer(regs);		/*		 * update the rtc when needed, this should be performed on the		 * right fraction of a second. Half or full second ?		 * Full second works on mk48t59 clocks, others need testing.		 * Note that this update is basically only used through		 * the adjtimex system calls. Setting the HW clock in		 * any other way is a /dev/rtc and userland business.		 * This is still wrong by -0.5/+1.5 jiffies because of the		 * timer interrupt resolution and possible delay, but here we		 * hit a quantization limit which can only be solved by higher		 * resolution timers and decoupling time management from timer		 * interrupts. This is also wrong on the clocks		 * which require being written at the half second boundary.		 * We should have an rtc call that only sets the minutes and		 * seconds like on Intel to avoid problems with non UTC clocks.		 */		if ( ppc_md.set_rtc_time && (time_status & STA_UNSYNC) == 0 &&		     xtime.tv_sec - last_rtc_update >= 659 &&		     abs((xtime.tv_nsec / 1000) - (1000000-1000000/HZ)) < 500000/HZ &&		     jiffies - wall_jiffies == 1) {		  	if (ppc_md.set_rtc_time(xtime.tv_sec+1 + timezone_offset) == 0)				last_rtc_update = xtime.tv_sec+1;			else				/* Try again one minute later */				last_rtc_update += 60;		}		write_sequnlock(&xtime_lock);	}	if ( !disarm_decr[smp_processor_id()] )		set_dec(next_dec);	last_jiffy_stamp(cpu) = jiffy_stamp;	if (ppc_md.heartbeat && !ppc_md.heartbeat_count--)		ppc_md.heartbeat();	irq_exit();}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b149ee2233edf08fb59b11e879a2c5941929bcb8/time.c/buggy/arch/ppc/kernel/time.c