if (vxtime.hpet_address) { 
if (vxtime.hpet_address) offset = hpet_readl(HPET_COUNTER);  if (hpet_use_timer) { /* if we're using the hpet timer functionality, * we can more accurately know the counter value * when the timer interrupt occured. */ 
static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs){	static unsigned long rtc_update = 0;	unsigned long tsc;	int delay, offset = 0, lost = 0;/* * Here we are in the timer irq handler. We have irqs locally disabled (so we * don't need spin_lock_irqsave()) but we don't know if the timer_bh is running * on the other CPU, so we need a lock. We also need to lock the vsyscall * variables, because both do_timer() and us change them -arca+vojtech */	write_seqlock(&xtime_lock);	if (vxtime.hpet_address) {		offset = hpet_readl(HPET_T0_CMP) - hpet_tick;		delay = hpet_readl(HPET_COUNTER) - offset;	} else {		spin_lock(&i8253_lock);		outb_p(0x00, 0x43);		delay = inb_p(0x40);		delay |= inb(0x40) << 8;		spin_unlock(&i8253_lock);		delay = LATCH - 1 - delay;	}	rdtscll_sync(&tsc);	if (vxtime.mode == VXTIME_HPET) {		if (offset - vxtime.last > hpet_tick) {			lost = (offset - vxtime.last) / hpet_tick - 1;		}		monotonic_base += 			(offset - vxtime.last)*(NSEC_PER_SEC/HZ) / hpet_tick;		vxtime.last = offset;#ifdef CONFIG_X86_PM_TIMER	} else if (vxtime.mode == VXTIME_PMTMR) {		lost = pmtimer_mark_offset();#endif	} else {		offset = (((tsc - vxtime.last_tsc) *			   vxtime.tsc_quot) >> 32) - (USEC_PER_SEC / HZ);		if (offset < 0)			offset = 0;		if (offset > (USEC_PER_SEC / HZ)) {			lost = offset / (USEC_PER_SEC / HZ);			offset %= (USEC_PER_SEC / HZ);		}		monotonic_base += (tsc - vxtime.last_tsc)*1000000/cpu_khz ;		vxtime.last_tsc = tsc - vxtime.quot * delay / vxtime.tsc_quot;		if ((((tsc - vxtime.last_tsc) *		      vxtime.tsc_quot) >> 32) < offset)			vxtime.last_tsc = tsc -				(((long) offset << 32) / vxtime.tsc_quot) - 1;	}	if (lost > 0) {		handle_lost_ticks(lost, regs);		jiffies += lost;	}/* * Do the timer stuff. */	do_timer(regs);#ifndef CONFIG_SMP	update_process_times(user_mode(regs));#endif/* * In the SMP case we use the local APIC timer interrupt to do the profiling, * except when we simulate SMP mode on a uniprocessor system, in that case we * have to call the local interrupt handler. */#ifndef CONFIG_X86_LOCAL_APIC	profile_tick(CPU_PROFILING, regs);#else	if (!using_apic_timer)		smp_local_timer_interrupt(regs);#endif/* * If we have an externally synchronized Linux clock, then update CMOS clock * accordingly every ~11 minutes. set_rtc_mmss() will be called in the jiffy * closest to exactly 500 ms before the next second. If the update fails, we * don't care, as it'll be updated on the next turn, and the problem (time way * off) isn't likely to go away much sooner anyway. */	if ((~time_status & STA_UNSYNC) && xtime.tv_sec > rtc_update &&		abs(xtime.tv_nsec - 500000000) <= tick_nsec / 2) {		set_rtc_mmss(xtime.tv_sec);		rtc_update = xtime.tv_sec + 660;	} 	write_sequnlock(&xtime_lock);	return IRQ_HANDLED;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/a3a00751ad8970c13d0563c2e92ee68c655a8e6b/time.c/buggy/arch/x86_64/kernel/time.c