linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ixp4xx: implement sched_clock()
@ 2009-12-29 15:27 Mikael Pettersson
  2010-01-08 17:27 ` Russell King - ARM Linux
  2010-01-08 21:07 ` Krzysztof Halasa
  0 siblings, 2 replies; 4+ messages in thread
From: Mikael Pettersson @ 2009-12-29 15:27 UTC (permalink / raw)
  To: linux-arm-kernel

Add a better sched_clock() to the ixp4xx platform,
implemented via its clocksource support.

This is based on the sched_clock() I implemented for
the IOP platform. Tested on a ds101 ixp420 machine.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
---
 arch/arm/mach-ixp4xx/common.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff -rupN linux-2.6.33-rc2/arch/arm/mach-ixp4xx/common.c linux-2.6.33-rc2.arm-ixp4xx-sched_clock/arch/arm/mach-ixp4xx/common.c
--- linux-2.6.33-rc2/arch/arm/mach-ixp4xx/common.c	2009-12-26 15:20:55.000000000 +0100
+++ linux-2.6.33-rc2.arm-ixp4xx-sched_clock/arch/arm/mach-ixp4xx/common.c	2009-12-26 15:39:01.000000000 +0100
@@ -427,6 +427,17 @@ static void __init ixp4xx_clocksource_in
 }
 
 /*
+ * sched_clock()
+ */
+unsigned long long sched_clock(void)
+{
+	cycle_t cyc = ixp4xx_get_cycles(NULL);
+	struct clocksource *cs = &clocksource_ixp4xx;
+
+	return clocksource_cyc2ns(cyc, cs->mult, cs->shift);
+}
+
+/*
  * clockevents
  */
 static int ixp4xx_set_next_event(unsigned long evt,

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

* [PATCH] ixp4xx: implement sched_clock()
  2009-12-29 15:27 [PATCH] ixp4xx: implement sched_clock() Mikael Pettersson
@ 2010-01-08 17:27 ` Russell King - ARM Linux
  2010-01-08 21:07 ` Krzysztof Halasa
  1 sibling, 0 replies; 4+ messages in thread
From: Russell King - ARM Linux @ 2010-01-08 17:27 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Dec 29, 2009 at 04:27:12PM +0100, Mikael Pettersson wrote:
> Add a better sched_clock() to the ixp4xx platform,
> implemented via its clocksource support.
> 
> This is based on the sched_clock() I implemented for
> the IOP platform. Tested on a ds101 ixp420 machine.

Great, patch system please?  Thanks.

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

* [PATCH] ixp4xx: implement sched_clock()
  2009-12-29 15:27 [PATCH] ixp4xx: implement sched_clock() Mikael Pettersson
  2010-01-08 17:27 ` Russell King - ARM Linux
@ 2010-01-08 21:07 ` Krzysztof Halasa
  2010-01-09 11:30   ` Mikael Pettersson
  1 sibling, 1 reply; 4+ messages in thread
From: Krzysztof Halasa @ 2010-01-08 21:07 UTC (permalink / raw)
  To: linux-arm-kernel

Mikael Pettersson <mikpe@it.uu.se> writes:

> Add a better sched_clock() to the ixp4xx platform,
> implemented via its clocksource support.
>
> This is based on the sched_clock() I implemented for
> the IOP platform. Tested on a ds101 ixp420 machine.

Good to see the confirmation, I know next to nothing about the
clocksource matter. I can pick this up if you wish, of course,
or you can send it through Russell.
-- 
Krzysztof Halasa

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

* [PATCH] ixp4xx: implement sched_clock()
  2010-01-08 21:07 ` Krzysztof Halasa
@ 2010-01-09 11:30   ` Mikael Pettersson
  0 siblings, 0 replies; 4+ messages in thread
From: Mikael Pettersson @ 2010-01-09 11:30 UTC (permalink / raw)
  To: linux-arm-kernel

Krzysztof Halasa writes:
 > Mikael Pettersson <mikpe@it.uu.se> writes:
 > 
 > > Add a better sched_clock() to the ixp4xx platform,
 > > implemented via its clocksource support.
 > >
 > > This is based on the sched_clock() I implemented for
 > > the IOP platform. Tested on a ds101 ixp420 machine.
 > 
 > Good to see the confirmation, I know next to nothing about the
 > clocksource matter. I can pick this up if you wish, of course,
 > or you can send it through Russell.

I'll send it to the patch system later today.

/Mikael

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

end of thread, other threads:[~2010-01-09 11:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-29 15:27 [PATCH] ixp4xx: implement sched_clock() Mikael Pettersson
2010-01-08 17:27 ` Russell King - ARM Linux
2010-01-08 21:07 ` Krzysztof Halasa
2010-01-09 11:30   ` Mikael Pettersson

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).