public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] ARM: architected timers: Mark the clockevent with the C3_STOP feature
@ 2012-07-04  9:54 Santosh Shilimkar
  2012-07-04  9:56 ` Marc Zyngier
  2012-07-04 10:26 ` Russell King - ARM Linux
  0 siblings, 2 replies; 5+ messages in thread
From: Santosh Shilimkar @ 2012-07-04  9:54 UTC (permalink / raw)
  To: linux-arm-kernel

ARM arch timers stop in low power state and hence can not wakeup CPUs in
deeper idle states when used as cloc event devices. Marking these clock event
devices with C3_STOP so that during lowpower states, the tick is managed by
wakeup capable broadcast timer.

Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
 arch/arm/kernel/arch_timer.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/kernel/arch_timer.c b/arch/arm/kernel/arch_timer.c
index dd58035..df44c8c 100644
--- a/arch/arm/kernel/arch_timer.c
+++ b/arch/arm/kernel/arch_timer.c
@@ -137,7 +137,7 @@ static int __cpuinit arch_timer_setup(struct clock_event_device *clk)
 	/* Be safe... */
 	arch_timer_disable();
 
-	clk->features = CLOCK_EVT_FEAT_ONESHOT;
+	clk->features = CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_C3STOP;
 	clk->name = "arch_sys_timer";
 	clk->rating = 450;
 	clk->set_mode = arch_timer_set_mode;
-- 
1.7.9.5

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

* [PATCH] ARM: architected timers: Mark the clockevent with the C3_STOP feature
  2012-07-04  9:54 [PATCH] ARM: architected timers: Mark the clockevent with the C3_STOP feature Santosh Shilimkar
@ 2012-07-04  9:56 ` Marc Zyngier
  2012-07-04 10:00   ` Shilimkar, Santosh
  2012-07-04 10:26 ` Russell King - ARM Linux
  1 sibling, 1 reply; 5+ messages in thread
From: Marc Zyngier @ 2012-07-04  9:56 UTC (permalink / raw)
  To: linux-arm-kernel

On 04/07/12 10:54, Santosh Shilimkar wrote:
> ARM arch timers stop in low power state and hence can not wakeup CPUs in
> deeper idle states when used as cloc event devices. Marking these clock event
> devices with C3_STOP so that during lowpower states, the tick is managed by
> wakeup capable broadcast timer.
> 
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>

Hi Santosh,

I already have queued an identical patch from Lorenzo.
Thanks for reminder anyway!

	M.

> ---
>  arch/arm/kernel/arch_timer.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/kernel/arch_timer.c b/arch/arm/kernel/arch_timer.c
> index dd58035..df44c8c 100644
> --- a/arch/arm/kernel/arch_timer.c
> +++ b/arch/arm/kernel/arch_timer.c
> @@ -137,7 +137,7 @@ static int __cpuinit arch_timer_setup(struct clock_event_device *clk)
>  	/* Be safe... */
>  	arch_timer_disable();
>  
> -	clk->features = CLOCK_EVT_FEAT_ONESHOT;
> +	clk->features = CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_C3STOP;
>  	clk->name = "arch_sys_timer";
>  	clk->rating = 450;
>  	clk->set_mode = arch_timer_set_mode;


-- 
Jazz is not dead. It just smells funny...

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

* [PATCH] ARM: architected timers: Mark the clockevent with the C3_STOP feature
  2012-07-04  9:56 ` Marc Zyngier
@ 2012-07-04 10:00   ` Shilimkar, Santosh
  0 siblings, 0 replies; 5+ messages in thread
From: Shilimkar, Santosh @ 2012-07-04 10:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jul 4, 2012 at 3:26 PM, Marc Zyngier <marc.zyngier@arm.com> wrote:
>
> On 04/07/12 10:54, Santosh Shilimkar wrote:
> > ARM arch timers stop in low power state and hence can not wakeup CPUs in
> > deeper idle states when used as cloc event devices. Marking these clock
> > event
> > devices with C3_STOP so that during lowpower states, the tick is managed
> > by
> > wakeup capable broadcast timer.
> >
> > Cc: Marc Zyngier <marc.zyngier@arm.com>
> > Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>
> Hi Santosh,
>
> I already have queued an identical patch from Lorenzo.
> Thanks for reminder anyway!
>
OK. Thanks for the information Mark.
Looks like I missed that one on the list.

Regards,
Santosh

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

* [PATCH] ARM: architected timers: Mark the clockevent with the C3_STOP feature
  2012-07-04  9:54 [PATCH] ARM: architected timers: Mark the clockevent with the C3_STOP feature Santosh Shilimkar
  2012-07-04  9:56 ` Marc Zyngier
@ 2012-07-04 10:26 ` Russell King - ARM Linux
  2012-07-04 10:41   ` Shilimkar, Santosh
  1 sibling, 1 reply; 5+ messages in thread
From: Russell King - ARM Linux @ 2012-07-04 10:26 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jul 04, 2012 at 03:24:33PM +0530, Santosh Shilimkar wrote:
> ARM arch timers stop in low power state and hence can not wakeup CPUs in
> deeper idle states when used as cloc event devices. Marking these clock event
> devices with C3_STOP so that during lowpower states, the tick is managed by
> wakeup capable broadcast timer.

Will tells me that the arch timers don't stop in low power modes, they
just can't produce wakeup events.  Apparantly the spec says:

   The system counter must be implemented in an always-on power domain.
   Use of lower-frequency modes must not affect the implemented accuracy.

Are you sure your above description of the problem is correct?

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

* [PATCH] ARM: architected timers: Mark the clockevent with the C3_STOP feature
  2012-07-04 10:26 ` Russell King - ARM Linux
@ 2012-07-04 10:41   ` Shilimkar, Santosh
  0 siblings, 0 replies; 5+ messages in thread
From: Shilimkar, Santosh @ 2012-07-04 10:41 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jul 4, 2012 at 3:56 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
>
> On Wed, Jul 04, 2012 at 03:24:33PM +0530, Santosh Shilimkar wrote:
> > ARM arch timers stop in low power state and hence can not wakeup CPUs in
> > deeper idle states when used as cloc event devices. Marking these clock
> > event
> > devices with C3_STOP so that during lowpower states, the tick is managed
> > by
> > wakeup capable broadcast timer.
>
> Will tells me that the arch timers don't stop in low power modes, they
> just can't produce wakeup events.  Apparantly the spec says:
>
>    The system counter must be implemented in an always-on power domain.
>    Use of lower-frequency modes must not affect the implemented accuracy.
>
> Are you sure your above description of the problem is correct?

Yes. Will is right.
The arch timers don't stop with a real time counter implementation.
The issue is they are not wakeup capable hence you need a broad-cast switching
which in turn needs C3_STOP.

Regards
Santosh

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

end of thread, other threads:[~2012-07-04 10:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-04  9:54 [PATCH] ARM: architected timers: Mark the clockevent with the C3_STOP feature Santosh Shilimkar
2012-07-04  9:56 ` Marc Zyngier
2012-07-04 10:00   ` Shilimkar, Santosh
2012-07-04 10:26 ` Russell King - ARM Linux
2012-07-04 10:41   ` Shilimkar, Santosh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox