!(id & HPET_ID_NUMBER) || 
if (!(id & HPET_ID_NUMBER)) return -1; 
int __init hpet_enable(void){	unsigned int id;	unsigned long tick_fsec_low, tick_fsec_high; /* tick in femto sec */	unsigned long hpet_tick_rem;	if (boot_hpet_disable)		return -1;	if (!hpet_address) {		return -1;	}	hpet_virt_address = ioremap_nocache(hpet_address, HPET_MMAP_SIZE);	/*	 * Read the period, compute tick and quotient.	 */	id = hpet_readl(HPET_ID);	/*	 * We are checking for value '1' or more in number field if	 * CONFIG_HPET_EMULATE_RTC is set because we will need an	 * additional timer for RTC emulation.	 * However, we can do with one timer otherwise using the	 * the single HPET timer for system time.	 */	if (#ifdef CONFIG_HPET_EMULATE_RTC		!(id & HPET_ID_NUMBER) ||#endif	    !(id & HPET_ID_LEGSUP))		return -1;	hpet_period = hpet_readl(HPET_PERIOD);	if ((hpet_period < HPET_MIN_PERIOD) || (hpet_period > HPET_MAX_PERIOD))		return -1;	/*	 * 64 bit math	 * First changing tick into fsec	 * Then 64 bit div to find number of hpet clk per tick	 */	ASM_MUL64_REG(tick_fsec_low, tick_fsec_high,			KERNEL_TICK_USEC, FSEC_TO_USEC);	ASM_DIV64_REG(hpet_tick, hpet_tick_rem,			hpet_period, tick_fsec_low, tick_fsec_high);	if (hpet_tick_rem > (hpet_period >> 1))		hpet_tick++; /* rounding the result */	if (hpet_timer_stop_set_go(hpet_tick))		return -1;	use_hpet = 1;#ifdef	CONFIG_HPET	{		struct hpet_data	hd;		unsigned int 		ntimer;		memset(&hd, 0, sizeof (hd));		ntimer = hpet_readl(HPET_ID);		ntimer = (ntimer & HPET_ID_NUMBER) >> HPET_ID_NUMBER_SHIFT;		ntimer++;		/*		 * Register with driver.		 * Timer0 and Timer1 is used by platform.		 */		hd.hd_phys_address = hpet_address;		hd.hd_address = hpet_virt_address;		hd.hd_nirqs = ntimer;		hd.hd_flags = HPET_DATA_PLATFORM;		hpet_reserve_timer(&hd, 0);#ifdef	CONFIG_HPET_EMULATE_RTC		hpet_reserve_timer(&hd, 1);#endif		hd.hd_irq[0] = HPET_LEGACY_8254;		hd.hd_irq[1] = HPET_LEGACY_RTC;		if (ntimer > 2) {			struct hpet __iomem	*hpet;			struct hpet_timer __iomem *timer;			int			i;			hpet = hpet_virt_address;			for (i = 2, timer = &hpet->hpet_timers[2]; i < ntimer;				timer++, i++)				hd.hd_irq[i] = (timer->hpet_config &					Tn_INT_ROUTE_CNF_MASK) >>					Tn_INT_ROUTE_CNF_SHIFT;		}		hpet_alloc(&hd);	}#endif#ifdef CONFIG_X86_LOCAL_APIC	wait_timer_tick = wait_hpet_tick;#endif	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/35492df5ae0f36f717448b2aea908d3a8891d1c4/time_hpet.c/buggy/arch/i386/kernel/time_hpet.c