linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Read TCN-register in user space
@ 2005-03-07 11:02 Björn Östby
  2005-03-07 21:41 ` Kumar Gala
  0 siblings, 1 reply; 2+ messages in thread
From: Björn Östby @ 2005-03-07 11:02 UTC (permalink / raw)
  To: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 588 bytes --]

I'm currently using ELDK 3.0 (kernel 2.4.25) and a mpc823e trying to do some latency measurements for my final thesis project.

I'm wondering if there is any possibility to read the Timer Counter Register (TCN1) in user space. I have initially used gettimeofday(), which provides sufficient resolution (usec), but I suppose that solution probably adds on some kind of unknown context-switch latency. Does anyone have a clue on how to access this in user space? Could inline assembler or perhaps mmap() do the trick (I'm using C as programming language)?.


Regards,
Bjorn 





[-- Attachment #2: Type: text/html, Size: 1195 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Read TCN-register in user space
  2005-03-07 11:02 Read TCN-register in user space Björn Östby
@ 2005-03-07 21:41 ` Kumar Gala
  0 siblings, 0 replies; 2+ messages in thread
From: Kumar Gala @ 2005-03-07 21:41 UTC (permalink / raw)
  To: Björn Östby; +Cc: linuxppc-embedded

There is a proper way to do this and hackish way.  The proper way is to=20=

eventually provide some interface via the work BenH has been doing with=20=

vDSO (while out).  The hackish way is to export it via some /proc or=20
sysfs attribute.  The hackish way will not make its way into a mainline=20=

tree.

- kumar

On Mar 7, 2005, at 5:02 AM, Bj=F6rn =D6stby wrote:

> I'm currently using ELDK 3.0 (kernel 2.4.25) and a mpc823e trying to=20=

> do some latency measurements for my final thesis project.
>
> I'm wondering if there is any possibility to read the Timer Counter=20
> Register (TCN1) in user space. I have initially used gettimeofday(),=20=

> which provides sufficient resolution (usec), but I suppose that=20
> solution probably adds on some kind of unknown context-switch latency.=20=

> Does anyone have a clue on how to access this in user space? Could=20
> inline assembler or perhaps mmap() do the trick (I'm using C as=20
> programming language)?.
>
>
>
> Regards,
>  Bjorn
>
>
>
>  <ATT07173.txt>=

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-03-07 21:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-07 11:02 Read TCN-register in user space Björn Östby
2005-03-07 21:41 ` Kumar Gala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).