Skip to contentSkip to conversation

clocksource: arch_timer: Set dynamic irq affinity on mmio clockevent

PATCH Applied Stephen Boyd 2 participants 2 messages Jan 6, 2014 – Jan 14, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clocksource: arch_timer: Set dynamic irq affinity on mmio clockevent

Set the CLOCK_EVT_FEAT_DYNIRQ flag on the memory mapped clockevent so that we save power by waking up the CPU with the next event when this timer is used in broadcast mode.

---
 drivers/clocksource/arm_arch_timer.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clocksource/arm_arch_timer.c +1 -0
index 95fb944e15ee..57e823c44d2a 100644
@@ -277,6 +277,7 @@ static void __arch_timer_setup(unsigned type,
 			clk->set_next_event = arch_timer_set_next_event_phys;
 		}
 	} else {
+		clk->features |= CLOCK_EVT_FEAT_DYNIRQ;
 		clk->name = "arch_mem_timer";
 		clk->rating = 400;
 		clk->cpumask = cpu_all_mask;
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
#1 lore raw
Quoted 15 lines · Stephen Boyd

Set the CLOCK_EVT_FEAT_DYNIRQ flag on the memory mapped clockevent so that we save power by waking up the CPU with the next event when this timer is used in broadcast mode.

---
  drivers/clocksource/arm_arch_timer.c | 1 +
  1 file changed, 1 insertion(+)
drivers/clocksource/arm_arch_timer.c +0 -0
index 95fb944e15ee..57e823c44d2a 100644

drivers/clocksource/arm_arch_timer.c static void __arch_timer_setup(unsigned type, · line 283

Quoted 7 lines
drivers/clocksource/arm_arch_timer.c +1 -0
@@ -277,6 +277,7 @@ static void __arch_timer_setup(unsigned type,
  			clk->set_next_event = arch_timer_set_next_event_phys;
  		}
  	} else {
+		clk->features |= CLOCK_EVT_FEAT_DYNIRQ;
  		clk->name = "arch_mem_timer";
  		clk->rating = 400;
  		clk->cpumask = cpu_all_mask;

Applied in my tree for 3.15.

I am curious how much you saved in your current scenario. Did you had time to do some rough measurements ?

Thanks
-- Daniel

Signature · 5 lines
  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog