Skip to contentSkip to conversation

ARM: architected timers: Mark the clockevent with the C3_STOP feature

PATCH New Santosh Shilimkar 3 participants 5 messages Jul 4, 2012 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: architected timers: Mark the clockevent with the C3_STOP feature

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.

---
 arch/arm/kernel/arch_timer.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/kernel/arch_timer.c +1 -1
index dd58035..df44c8c 100644
@@ -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;
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 ARM: architected timers: Mark the clockevent with the C3_STOP feature

Quoted 7 lines · Santosh Shilimkar

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.

Hi Santosh,

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

	M.
Quoted 17 lines
---
 arch/arm/kernel/arch_timer.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/kernel/arch_timer.c +1 -1
index dd58035..df44c8c 100644
@@ -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;
Signature · 1 line
Jazz is not dead. It just smells funny...
#2 lore raw

PATCH 1/1 ARM: architected timers: Mark the clockevent with the C3_STOP feature

Quoted 9 lines · Marc Zyngier
Quoted 7 lines · Santosh Shilimkar

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.

Quoted 8 lines
Quoted 2 lines

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

#3 lore raw

PATCH 1/1 ARM: architected timers: Mark the clockevent with the C3_STOP feature

In reply to Santosh Shilimkar
Quoted 4 lines · Santosh Shilimkar

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?

#4 lore raw

PATCH 1/1 ARM: architected timers: Mark the clockevent with the C3_STOP feature

Quoted 9 lines · Russell King - ARM Linux
Quoted 6 lines · Santosh Shilimkar

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.

Quoted 7 lines

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