RE: Dell BIOS and HPET timer support

From: Pallipadi, Venkatesh
Date: Wed Jun 08 2005 - 21:07:32 EST




I think do_div expects a 64 bit 1st argument. Can you change ns to
unsigneld long long and try...

Thanks,
Venki

>-----Original Message-----
>From: Jon Smirl [mailto:jonsmirl@xxxxxxxxx]
>Sent: Wednesday, June 08, 2005 6:38 PM
>To: Lee Revell
>Cc: Pallipadi, Venkatesh; lkml; Bob Picco
>Subject: Re: Dell BIOS and HPET timer support
>
>On 6/8/05, Lee Revell <rlrevell@xxxxxxxxxxx> 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@xxxxxxxxx
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/