From: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
To: Samuel Xu <samuel.xu.tech@gmail.com>
Cc: platform-driver-x86@vger.kernel.org
Subject: Re: How to read time stamp from HPET timer from device driver?
Date: Tue, 13 Jul 2010 10:08:36 -0300 [thread overview]
Message-ID: <20100713130836.GD9114@barata.holoscopio.com> (raw)
In-Reply-To: <AANLkTimRXZqDDcIsPEbgNdAEk3ZzEXzp2MXMcLgl1UnS@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1176 bytes --]
On Tue, Jul 13, 2010 at 05:39:11PM +0800, Samuel Xu wrote:
> I tried hpet_readl() from my driver code, while hit compiling error.
> is it a correct API for kernel driver to invoke? any more hint?
>
What are you trying to do exactly? Using TSC or HPET is not
platform-independent. You may take a look at hrtimers.
Regards,
Cascardo.
> 2010/7/13 Samuel Xu <samuel.xu.tech@gmail.com>:
> > HI:
> > I am a freshman for HPET timer. Previously, I use TSC counter, to use
> > rdtsc to get the time stamp. elapsed cycle can be counter from 2 time
> > stamps.
> > As a advanced replacement of TSC, I suppose HPET timer can be
> > conveniently to read time stamp from both kernel mode user and user
> > mode apps.
> > While I failed to find a way to get time stamp value of HPET in Linux
> > kenerl (I am doing a driver and want to know elapsed cycle from driver
> > code).
> >
> > Anyone can help me?
> >
> > Thanks!
> >
> > Samuel
> >
> --
> To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2010-07-13 13:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-13 9:36 How to read time stamp from HPET timer from device driver? Samuel Xu
2010-07-13 9:39 ` Samuel Xu
2010-07-13 13:08 ` Thadeu Lima de Souza Cascardo [this message]
2010-07-13 13:34 ` Samuel Xu
2010-07-13 14:03 ` Thadeu Lima de Souza Cascardo
2010-07-15 16:39 ` Thomas Renninger
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=20100713130836.GD9114@barata.holoscopio.com \
--to=cascardo@holoscopio.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=samuel.xu.tech@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox