From patchwork Tue Jun 28 10:30:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 9202657 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 289FF60757 for ; Tue, 28 Jun 2016 10:37:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1892C285F2 for ; Tue, 28 Jun 2016 10:37:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0CEDC285F6; Tue, 28 Jun 2016 10:37:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5A797285F2 for ; Tue, 28 Jun 2016 10:37:25 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bHqOS-0003zo-0V; Tue, 28 Jun 2016 10:37:24 +0000 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bHqKO-0005pq-36 for linux-rockchip@lists.infradead.org; Tue, 28 Jun 2016 10:33:14 +0000 Received: by mail-wm0-x232.google.com with SMTP id v199so133574073wmv.0 for ; Tue, 28 Jun 2016 03:32:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mXGVnnirKeC4q0vKL0TSbfmY260iu4oRAxodOdQ59tA=; b=CU1jLheMzH/cA7RJKf7+cVZBHmWsz4BXLGkD3BJkSNZ5Jqk8c/IBumtEEdwF3VwAvD uo7zt07olxjHr3ECn0Sze40VQgkjN9ditXC4YSG+aUNT2z3DnuudWb4P0EbGCK2hijwT 5ECsYProKc7XeWTlmFRg+DyIllGi3HkhOixUI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mXGVnnirKeC4q0vKL0TSbfmY260iu4oRAxodOdQ59tA=; b=DLWki1zIbdxUr0jRmVz8EZx5vOa8pKAAwGVYl1E5nbjV7htWeb1dITXg+ggQq1CE2B SWBTVG3R+/E+8QaKX4xWtCNhLZo4dd8C+/cOMSjvSguO1W8EoGgihRrXkk4QVjb9drPJ 5zvrpxOpgwbHZCFoVnJ/wBu1JGTNkSwiU3LoQEUKsle7qXs7OIfA7k2VVprR0YIRq46f u+/FCrT+zejVvg3tkg9kUg+dfigr0O4V77VAWU0Z7s6fE3f8SkjWNWwSM1Ap9PcnWcMP vGa1iu6CZEsSEBDKQCOhfQx/9WiyvwSbz7X6FQwZ4bZnSq18F47Um/VYSrP8W7eatcL+ pvmA== X-Gm-Message-State: ALyK8tLoDrg1wKY6NKM/2Oy35GvJBjpq8jLQ6eTkrEz4vxggWEW0zTPAK1TAJF9cC/99U4g7 X-Received: by 10.194.162.168 with SMTP id yb8mr2597352wjb.32.1467109970325; Tue, 28 Jun 2016 03:32:50 -0700 (PDT) Received: from localhost.localdomain (sju31-1-78-210-255-2.fbx.proxad.net. [78.210.255.2]) by smtp.gmail.com with ESMTPSA id a84sm5377403wma.0.2016.06.28.03.32.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 28 Jun 2016 03:32:49 -0700 (PDT) From: Daniel Lezcano To: daniel.lezcano@linaro.org, tglx@linutronix.de Subject: [PATCH 06/92] clocksource/drivers/rockchip: Add the dynamic irq flag to the timer Date: Tue, 28 Jun 2016 12:30:25 +0200 Message-Id: <1467109911-11060-6-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1467109911-11060-1-git-send-email-daniel.lezcano@linaro.org> References: <577251A4.7030508@linaro.org> <1467109911-11060-1-git-send-email-daniel.lezcano@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160628_033312_434131_4DC2B916 X-CRM114-Status: GOOD ( 11.22 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Huang, Tao" , Heiko Stuebner , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Jianqun Xu , linux-arm-kernel@lists.infradead.org, Caesar Wang MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Huang, Tao" 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. 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 --- 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 b991b28..b510863 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);