Re: How to read time stamp from HPET timer from device driver?

2010-07-15 Thread Thomas Renninger
On Tuesday 13 July 2010 03:34:50 pm Samuel Xu wrote: Hi, Cascardo: Thanks for reply! I just want to get the guide on some sample code of HPET usage invoked from kernel mode driver. You must not use hpet directly to keep track of the time. There is HW which does not have an hpet, or the kernel

How to read time stamp from HPET timer from device driver?

2010-07-13 Thread Samuel Xu
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.

Re: How to read time stamp from HPET timer from device driver?

2010-07-13 Thread Thadeu Lima de Souza Cascardo
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

Re: How to read time stamp from HPET timer from device driver?

2010-07-13 Thread Samuel Xu
Hi, Cascardo: Thanks for reply! I just want to get the guide on some sample code of HPET usage invoked from kernel mode driver. Any directly guide? Thanks! 2010/7/13 Thadeu Lima de Souza Cascardo casca...@holoscopio.com: On Tue, Jul 13, 2010 at 05:39:11PM +0800, Samuel Xu wrote: I tried

Re: How to read time stamp from HPET timer from device driver?

2010-07-13 Thread Thadeu Lima de Souza Cascardo
On Tue, Jul 13, 2010 at 09:34:50PM +0800, Samuel Xu wrote: Hi, Cascardo: Thanks for reply! I just want to get the guide on some sample code of HPET usage invoked from kernel mode driver. Any directly guide? Thanks! You asked if this is the right API. And the answer depends on what do you