if ((time_status & STA_UNSYNC) == 0 && 
if (ntp_synced() && 
irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs){	unsigned long j;	unsigned int count;	count = mips_hpt_read();	mips_timer_ack();	/* Update timerhi/timerlo for intra-jiffy calibration. */	timerhi += count < timerlo;			/* Wrap around */	timerlo = count;	/*	 * call the generic timer interrupt handling	 */	do_timer(regs);	/*	 * If we have an externally synchronized Linux clock, then update	 * CMOS clock accordingly every ~11 minutes. rtc_set_time() has to be	 * called as close as possible to 500 ms before the new second starts.	 */	write_seqlock(&xtime_lock);	if ((time_status & STA_UNSYNC) == 0 &&	    xtime.tv_sec > last_rtc_update + 660 &&	    (xtime.tv_nsec / 1000) >= 500000 - ((unsigned) TICK_SIZE) / 2 &&	    (xtime.tv_nsec / 1000) <= 500000 + ((unsigned) TICK_SIZE) / 2) {		if (rtc_set_mmss(xtime.tv_sec) == 0) {			last_rtc_update = xtime.tv_sec;		} else {			/* do it again in 60 s */			last_rtc_update = xtime.tv_sec - 600;		}	}	write_sequnlock(&xtime_lock);	/*	 * If jiffies has overflown in this timer_interrupt, we must	 * update the timer[hi]/[lo] to make fast gettimeoffset funcs	 * quotient calc still valid. -arca	 *	 * The first timer interrupt comes late as interrupts are	 * enabled long after timers are initialized.  Therefore the	 * high precision timer is fast, leading to wrong gettimeoffset()	 * calculations.  We deal with it by setting it based on the	 * number of its ticks between the second and the third interrupt.	 * That is still somewhat imprecise, but it's a good estimate.	 * --macro	 */	j = jiffies;	if (j < 4) {		static unsigned int prev_count;		static int hpt_initialized;		switch (j) {		case 0:			timerhi = timerlo = 0;			mips_hpt_init(count);			break;		case 2:			prev_count = count;			break;		case 3:			if (!hpt_initialized) {				unsigned int c3 = 3 * (count - prev_count);				timerhi = 0;				timerlo = c3;				mips_hpt_init(count - c3);				hpt_initialized = 1;			}			break;		default:			break;		}	}	/*	 * In UP mode, we call local_timer_interrupt() to do profiling	 * and process accouting.	 *	 * In SMP mode, local_timer_interrupt() is invoked by appropriate	 * low-level local timer interrupt handler.	 */	local_timer_interrupt(irq, dev_id, regs);	return IRQ_HANDLED;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b149ee2233edf08fb59b11e879a2c5941929bcb8/time.c/buggy/arch/mips/kernel/time.c