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: 9202621 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 6A3A060757 for ; Tue, 28 Jun 2016 10:34:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A01228568 for ; Tue, 28 Jun 2016 10:34:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4E65C285E6; Tue, 28 Jun 2016 10:34:58 +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 DB28128568 for ; Tue, 28 Jun 2016 10:34:57 +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 1bHqKl-0006Pm-La; Tue, 28 Jun 2016 10:33:35 +0000 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bHqKN-0005po-V2 for linux-arm-kernel@lists.infradead.org; Tue, 28 Jun 2016 10:33:14 +0000 Received: by mail-wm0-x233.google.com with SMTP id r201so20873385wme.1 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=LaFcUJIx8n6mT/nBhSK2cyGFgCcNp7qtbtliHpWc5yDfcNtlFFRxsVOZ1sEYhRDLIp KmHJlp7iNVZqW5uakeWlXIn4Eg8uL45iKUQtzt9+AxE4T1cKyhWtyXx/SF/gOO6OCKJL pszc/PMMBIyuoPsojwyGzGF3V8tSgbrPozbBLUq9xii97ymY7F03kKEujFPwcwBLg+Zf GucA3Hp/PvYAEYFzBwoemK+AvPxbnXFMnHt3kzOXD16ZjG0EcR+HNyEcq3wYdhvjgrs+ n5wVignnaaDrQ6pBNVJl2GtbvdYIFZUwr3Yjq7MeLnEA9IMKH+o2ZdgxlsSxscR5krGs B0tA== X-Gm-Message-State: ALyK8tKynem5BKniN/Brg5tZsQC4eYOWuP1Qdh67l+njOKULsNH1Z9521+Yw/lhVdgr6FBkb 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_370253_31F87002 X-CRM114-Status: GOOD ( 12.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: 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-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=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);