From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754433AbcEaNwV (ORCPT ); Tue, 31 May 2016 09:52:21 -0400 Received: from regular1.263xmail.com ([211.150.99.132]:45228 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754101AbcEaNwQ (ORCPT ); Tue, 31 May 2016 09:52:16 -0400 X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 X-RL-SENDER: huangtao@rock-chips.com X-FST-TO: huangtao@rock-chips.com X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: huangtao@rock-chips.com X-UNIQUE-TAG: <16924e80f0f54b10b55489795a3069af> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Subject: Re: [PATCH 3/5] clocksource: rockchip: add dynamic irq flag to the timer To: Daniel Lezcano , Caesar Wang , Heiko Stuebner References: <1464169802-6033-1-git-send-email-wxt@rock-chips.com> <1464169802-6033-4-git-send-email-wxt@rock-chips.com> <574CC9DE.1050501@linaro.org> Cc: dianders@chromium.org, briannorris@google.com, smbarber@google.com, linux-rockchip@lists.infradead.org, Thomas Gleixner , cf@rock-chips.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org From: "Huang, Tao" Message-ID: <574D958F.9010707@rock-chips.com> Date: Tue, 31 May 2016 21:45:51 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <574CC9DE.1050501@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Daniel: On 2016年05月31日 07:16, Daniel Lezcano wrote: > On 05/25/2016 11:50 AM, Caesar Wang wrote: >> From: Huang Tao >> >> The rockchip timer is broadcast timer. Add CLOCK_EVT_FEAT_DYNIRQ >> flag and set cpumask to all cpu to save power by avoid unnecessary >> wakeups and IPIs. >> >> Signed-off-by: Huang Tao >> Cc: Daniel Lezcano >> Cc: Thomas Gleixner >> Cc: Heiko Stuebner >> Tested-by: Jianqun Xu >> Signed-off-by: Caesar Wang >> --- >> >> drivers/clocksource/rockchip_timer.c | 5 +++-- >> 1 file changed, 3 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/clocksource/rockchip_timer.c b/drivers/clocksource/rockchip_timer.c >> index b93fed6..f3dfb1a 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_all_mask; > > s/cpu_all_mask/cpu_possible_mask/ Okay for me. It seems drivers in drivers/clocksource are very confusing about use cpu_all_mask or cpu_possible_mask. For example arm_arch_timer.c use cpu_all_mask, while mtk_timer.c use cpu_possible_mask. I think all just work. Thanks, Huang, Tao