From patchwork Thu Jul 7 08:00:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 9218119 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 3AFED6048B for ; Thu, 7 Jul 2016 08:03:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F4602879E for ; Thu, 7 Jul 2016 08:03:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 23DB9287A4; Thu, 7 Jul 2016 08:03:12 +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 C735E2879E for ; Thu, 7 Jul 2016 08:03:11 +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 1bL4H8-0004VR-E7; Thu, 07 Jul 2016 08:03:10 +0000 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bL4Gv-0004Ih-Da for linux-rockchip@lists.infradead.org; Thu, 07 Jul 2016 08:02:58 +0000 Received: by mail-wm0-x22a.google.com with SMTP id a66so21374321wme.0 for ; Thu, 07 Jul 2016 01:02:37 -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=CY+sTQf2xXdJtTYG5n3tczoSvoudmPeM1a51IZmHVtY+N75F0Rv5Hzy32Z4/ZrXTuA M2mLEEFBTPhIvxgvkHT8baf7zImY+6oTudShhOwN7fTzg8YhGCMgly9GY1iHj0VVJGBb DkrFC3Jcjzl3C4sOGTI+y/owfpFjv3DqjJEJ0= 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=im0Vnfda/HSggRDRk+8BOcbJ3YwYtJSJWn2c4kpfWlWaQt2euE14K0vcQtOb8E2lGx K9APz4CG4cQd0qamqsmVfRXpaJUZi/Wmnk0YgO//6vH2PVTEWD7OvYejdYDZffumcKRa ygpPDMBeFTdinkaMNCJg0PgLEhb+w/e2STcpP8ow0IUkiyuX6QrhhgN5ar5ot17EMqg/ akW+9kswG6YbYvpAhjRsb+mU7keQuOgCW1GxrF3eKAxsYqkXBbjqlhgYnlhPw1RiO+XF s11Gu4Aq1nvQgAv2EAqhCEbGU89iameh8kYmN7qB0ZxqSp740cAmqNeLHHFSm5XwTVc0 Wf/A== X-Gm-Message-State: ALyK8tLiJm6ZM/IQC97BZiuPmyAvgOGRCFTLSvfRbfMlrQ34nq68ZzhuTLf+Xbm+MXG8qLc9 X-Received: by 10.28.73.212 with SMTP id w203mr1397751wma.98.1467878555870; Thu, 07 Jul 2016 01:02:35 -0700 (PDT) Received: from localhost.localdomain (lft31-1-88-121-166-205.fbx.proxad.net. [88.121.166.205]) by smtp.gmail.com with ESMTPSA id v70sm51327wmf.18.2016.07.07.01.02.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Jul 2016 01:02:35 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de, daniel.lezcano@linaro.org Subject: [PATCH 06/93] clocksource/drivers/rockchip: Add the dynamic irq flag to the timer Date: Thu, 7 Jul 2016 10:00:39 +0200 Message-Id: <1467878526-1238-6-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1467878526-1238-1-git-send-email-daniel.lezcano@linaro.org> References: <577E0BED.3020608@linaro.org> <1467878526-1238-1-git-send-email-daniel.lezcano@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160707_010257_707614_741FDFF6 X-CRM114-Status: GOOD ( 10.90 ) 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);