Re: Dell BIOS and HPET timer support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/8/05, Lee Revell <[email protected]> wrote:
> Check the source, it's self-explanatory.  See hpet_alloc().

What is going on with do_div()? 
0x0429b17f /100000 = 69.8 in my caculator. It comes back as 0 from do_div().

[jonsmirl@jonsmirl ~]$ dmesg | grep HPET
HPET: cap 0429b17f8086a201 period 0429b17f
HPET: period 0429b17f ns 0429b17f
HPET: period 0429b17f ns 00000000
Using HPET for base-timer
Using HPET for gettimeofday
[jonsmirl@jonsmirl ~]$


	hpetp->hp_period = (cap & HPET_COUNTER_CLK_PERIOD_MASK) >>
	    HPET_COUNTER_CLK_PERIOD_SHIFT;
printk(KERN_ERR "HPET: cap %016llx period %08lx\n", cap, hpetp->hp_period);

	ns = hpetp->hp_period;	/* femptoseconds, 10^-15 */
printk(KERN_ERR "HPET: period %08lx ns %08lx \n", hpetp->hp_period, ns);
	do_div(ns, 1000000);	/* convert to nanoseconds, 10^-9 */
printk(KERN_ERR "HPET: period %08lx ns %08lx \n", hpetp->hp_period, ns);
	printk(KERN_INFO "hpet%d: %ldns tick, %d %d-bit timers\n",
		hpetp->hp_which, ns, hpetp->hp_ntimer,
		cap & HPET_COUNTER_SIZE_MASK ? 64 : 32);
-- 
Jon Smirl
[email protected]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux