All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Smirl <jonsmirl@gmail.com>
To: Lee Revell <rlrevell@joe-job.com>
Cc: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>,
	lkml <linux-kernel@vger.kernel.org>,
	Bob Picco <Robert.Picco@hp.com>
Subject: Re: Dell BIOS and HPET timer support
Date: Wed, 8 Jun 2005 21:38:04 -0400	[thread overview]
Message-ID: <9e47339105060818383e2311f@mail.gmail.com> (raw)
In-Reply-To: <1118278673.6247.32.camel@mindpipe>

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

  reply	other threads:[~2005-06-09  1:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-08 22:55 Dell BIOS and HPET timer support Pallipadi, Venkatesh
2005-06-09  0:34 ` Jon Smirl
2005-06-09  0:57   ` Lee Revell
2005-06-09  1:38     ` Jon Smirl [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-06-09  2:06 Pallipadi, Venkatesh
2005-06-09  2:09 ` Jon Smirl
2005-06-08 20:11 Jon Smirl
2005-06-08 22:02 ` Matt Domsch
2005-06-08 22:34   ` Jon Smirl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9e47339105060818383e2311f@mail.gmail.com \
    --to=jonsmirl@gmail.com \
    --cc=Robert.Picco@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rlrevell@joe-job.com \
    --cc=venkatesh.pallipadi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.