lkml.org 
[lkml]   [2005]   [Jun]   [8]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateWed, 8 Jun 2005 21:38:04 -0400
FromJon Smirl <>
SubjectRe: Dell BIOS and HPET timer support
On 6/8/05, Lee Revell <rlrevell@joe-job.com> 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
jonsmirl@gmail.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-06-09 03:42    [from the cache]
©2003-2009