From: Huang, Tao Date: Thu, 16 Jun 2016 13:57:53 +0000 (+0200) Subject: UPSTREAM: clocksource/drivers/rockchip: Add the dynamic irq flag to the timer X-Git-Tag: firefly_0821_release~2389 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=37a084a635faaf9e0efc83f2ee6807d9453e29be;p=firefly-linux-kernel-4.4.55.git UPSTREAM: clocksource/drivers/rockchip: Add the dynamic irq flag to the timer The rockchip timer is a broadcast timer. Add the CLOCK_EVT_FEAT_DYNIRQ flag and set the cpumask to all possible cpus to save power by avoiding unnecessary wakeups and IPIs. BUG=chrome-os-partner:54522 TEST=Tested on gru, cat /proc/interrupts |grep timer Change-Id: Ic7de570f35921a292e4687c2bcf408b37334f781 Signed-off-by: Huang Tao Cc: Daniel Lezcano Cc: Thomas Gleixner Cc: Heiko Stuebner Tested-by: Jianqun Xu Signed-off-by: Caesar Wang Signed-off-by: Daniel Lezcano (cherry picked from git.linaro.org/people/daniel.lezcano/linux.git clockevents/next commit 11932c2ac6f8c0f20f12a38569a36f0d1b5cfd6b) Reviewed-on: https://chromium-review.googlesource.com/353976 Reviewed-by: Douglas Anderson --- diff --git a/drivers/clocksource/rockchip_timer.c b/drivers/clocksource/rockchip_timer.c index b991b288c803..b510863fd1e1 100644 --- a/drivers/clocksource/rockchip_timer.c +++ b/drivers/clocksource/rockchip_timer.c @@ -150,12 +150,13 @@ static void __init rk_timer_init(struct device_node *np) } ce->name = TIMER_NAME; - ce->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT; + ce->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT | + CLOCK_EVT_FEAT_DYNIRQ; ce->set_next_event = rk_timer_set_next_event; ce->set_state_shutdown = rk_timer_shutdown; ce->set_state_periodic = rk_timer_set_periodic; ce->irq = irq; - ce->cpumask = cpumask_of(0); + ce->cpumask = cpu_possible_mask; ce->rating = 250; rk_timer_interrupt_clear(ce);