* Re: get_cycles()
2008-04-26 7:54 get_cycles() Kevin Diggs
@ 2008-04-26 7:11 ` David Miller
2008-04-27 2:39 ` get_cycles() Kevin Diggs
0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2008-04-26 7:11 UTC (permalink / raw)
To: kevdig; +Cc: linuxppc-dev
From: Kevin Diggs <kevdig@hypersurf.com>
Date: Sat, 26 Apr 2008 00:54:11 -0700
> Anyone know how to turn get_cycles() into an actual time in a module?
> ppc_tb_freq does not seem to be exported?
You should really be using ktime_t and associated interfaces.
^ permalink raw reply [flat|nested] 6+ messages in thread
* get_cycles()
@ 2008-04-26 7:54 Kevin Diggs
2008-04-26 7:11 ` get_cycles() David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Kevin Diggs @ 2008-04-26 7:54 UTC (permalink / raw)
To: linuxppc-dev
H,
Anyone know how to turn get_cycles() into an actual time in a module?
ppc_tb_freq does not seem to be exported?
kevin
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: get_cycles()
2008-04-26 7:11 ` get_cycles() David Miller
@ 2008-04-27 2:39 ` Kevin Diggs
2008-04-27 3:21 ` get_cycles() David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Kevin Diggs @ 2008-04-27 2:39 UTC (permalink / raw)
To: linuxppc-dev
David Miller wrote:
> From: Kevin Diggs <kevdig@hypersurf.com>
> Date: Sat, 26 Apr 2008 00:54:11 -0700
>
>
>> Anyone know how to turn get_cycles() into an actual time in a module?
>>ppc_tb_freq does not seem to be exported?
>
>
> You should really be using ktime_t and associated interfaces.
>
This looks pretty cool ... but I don't want to create a dependency on
hrtimer.
So ... How expensive would it be to export ppc_tb_freq? Or add a
get_cycles_tb() function?
kevin
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: get_cycles()
2008-04-27 2:39 ` get_cycles() Kevin Diggs
@ 2008-04-27 3:21 ` David Miller
2008-04-27 10:35 ` get_cycles() Kevin Diggs
0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2008-04-27 3:21 UTC (permalink / raw)
To: kevdig; +Cc: linuxppc-dev
From: Kevin Diggs <kevdig@hypersurf.com>
Date: Sat, 26 Apr 2008 19:39:07 -0700
> This looks pretty cool ... but I don't want to create a dependency on
> hrtimer.
It doesn't create such a dependency.
We use it unconditionally in the generic networking.
Please don't use platform specific interfaces if you don't have to.
You're be insulated from so many things.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: get_cycles()
2008-04-27 3:21 ` get_cycles() David Miller
@ 2008-04-27 10:35 ` Kevin Diggs
2008-04-28 4:38 ` get_cycles() Tony Breeds
0 siblings, 1 reply; 6+ messages in thread
From: Kevin Diggs @ 2008-04-27 10:35 UTC (permalink / raw)
To: linuxppc-dev
David Miller wrote:
> From: Kevin Diggs <kevdig@hypersurf.com>
> Date: Sat, 26 Apr 2008 19:39:07 -0700
>
>
>>This looks pretty cool ... but I don't want to create a dependency on
>>hrtimer.
>
>
> It doesn't create such a dependency.
>
> We use it unconditionally in the generic networking.
>
> Please don't use platform specific interfaces if you don't have to.
> You're be insulated from so many things.
>
I'm working on a cpufreq driver for the 750GX so I don't think I have to
worry about being to platform specific.
Would a compile time configuration be a good idea (hrtimer or
get_cycles() assisted timing)?
In the 2.4 code I just used a timer 2 ticks in the future to be certain
I did not go under the 100 us PLL lock delay. I was trying to see if I
could cut the latency down.
What about using OF? Isn't there a timebase property for the cpus?
Thoughts?
kevin
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: get_cycles()
2008-04-27 10:35 ` get_cycles() Kevin Diggs
@ 2008-04-28 4:38 ` Tony Breeds
0 siblings, 0 replies; 6+ messages in thread
From: Tony Breeds @ 2008-04-28 4:38 UTC (permalink / raw)
To: Kevin Diggs; +Cc: linuxppc-dev
On Sun, Apr 27, 2008 at 03:35:54AM -0700, Kevin Diggs wrote:
> I'm working on a cpufreq driver for the 750GX so I don't think I have to
> worry about being to platform specific.
>
> Would a compile time configuration be a good idea (hrtimer or
> get_cycles() assisted timing)?
Save yourself the pain, and use the hrtimers infrastructure.
> In the 2.4 code I just used a timer 2 ticks in the future to be certain
> I did not go under the 100 us PLL lock delay. I was trying to see if I
> could cut the latency down.
>
> What about using OF? Isn't there a timebase property for the cpus?
Sure, If you really don't want to use the infrastructure that's there
feel free to duplicate portions of arch/powerpc/kernel/time.c and
kernel/time/* into your cpufreq driver.
Yours Tony
linux.conf.au http://www.marchsouth.org/
Jan 19 - 24 2009 The Australian Linux Technical Conference!
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-04-28 4:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-26 7:54 get_cycles() Kevin Diggs
2008-04-26 7:11 ` get_cycles() David Miller
2008-04-27 2:39 ` get_cycles() Kevin Diggs
2008-04-27 3:21 ` get_cycles() David Miller
2008-04-27 10:35 ` get_cycles() Kevin Diggs
2008-04-28 4:38 ` get_cycles() Tony Breeds
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).