Message ID | 1390802904-28399-5-git-send-email-nicolas.pitre@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBCE6L2HOQQPRBF7SS6LQKGQE75LNW6Y@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 09432203C4 for <linaro@patches.linaro.org>; Mon, 27 Jan 2014 06:13:43 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id wo20sf21116322obc.11 for <linaro@patches.linaro.org>; Sun, 26 Jan 2014 22:13:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=tNb0e8d5d+oOrgbox6G2GW/QTaSadABieQnjlKsKy6Q=; b=dCcO3jeqhF3UrpfXr5Tv/Bd9GSFqPKggtzKllpZJ4P3RD3KLukXzTaqysYngTvJP1h XQgn+CkMcTmrFprDX86XpZztjag0Hz9K4dAr69PzEsk0c7vOorLPCK4Ve6B0KxYdJqLI 4Uh/hztZAz0cAFg3vf3qXBx91qVvCqydNcrx60+NxQRpKqOjjSpwJBeoNfxILXcmAuEU 4dKyWWpwFI5vsUImTEn32es4r3yQ8m0xxflykpe6KrDV3cUwU2HxIzgBT/Xb/d+gp6rV nZiDSKIPqrV+L16EZyGz16urmWuxwFaoYqy6KatfJIZHdsSzuYL3qy5cE1pv4IwlYXeh WyaQ== X-Gm-Message-State: ALoCoQk4xgHpwMmJHNnridtqyE8FQxb/iAw/Lfb9eXxyc1zBwsAfjN60Ihlz2TSKiZG2OmYQVesw X-Received: by 10.182.151.42 with SMTP id un10mr10359107obb.12.1390803223043; Sun, 26 Jan 2014 22:13:43 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.24.49 with SMTP id 46ls1526455qgq.21.gmail; Sun, 26 Jan 2014 22:13:42 -0800 (PST) X-Received: by 10.220.161.132 with SMTP id r4mr43291vcx.29.1390803222952; Sun, 26 Jan 2014 22:13:42 -0800 (PST) Received: from mail-vb0-f43.google.com (mail-vb0-f43.google.com [209.85.212.43]) by mx.google.com with ESMTPS id kp12si4717398vcb.91.2014.01.26.22.13.42 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 26 Jan 2014 22:13:42 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.43 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.43; Received: by mail-vb0-f43.google.com with SMTP id p5so3116868vbn.16 for <patchwork-forward@linaro.org>; Sun, 26 Jan 2014 22:13:42 -0800 (PST) X-Received: by 10.52.230.35 with SMTP id sv3mr2264576vdc.27.1390803222873; Sun, 26 Jan 2014 22:13:42 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp106829vcz; Sun, 26 Jan 2014 22:13:42 -0800 (PST) X-Received: by 10.205.12.65 with SMTP id ph1mr20296364bkb.31.1390803221866; Sun, 26 Jan 2014 22:13:41 -0800 (PST) Received: from casper.infradead.org (casper.infradead.org. [2001:770:15f::2]) by mx.google.com with ESMTPS id qp3si12848934bkb.333.2014.01.26.22.13.41 for <patch@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Jan 2014 22:13:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:770:15f::2 as permitted sender) client-ip=2001:770:15f::2; Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W7fPL-0002yf-QO; Mon, 27 Jan 2014 06:10:56 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W7fOw-0003ig-Dg; Mon, 27 Jan 2014 06:10:30 +0000 Received: from relais.videotron.ca ([24.201.245.36]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W7fO8-0003YP-CU for linux-arm-kernel@lists.infradead.org; Mon, 27 Jan 2014 06:09:42 +0000 Received: from yoda.home ([66.130.143.177]) by VL-VM-MR006.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0N0100CK1QFBKVJ0@VL-VM-MR006.ip.videotron.ca> for linux-arm-kernel@lists.infradead.org; Mon, 27 Jan 2014 01:09:11 -0500 (EST) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTP id 511C12DA06A5; Mon, 27 Jan 2014 01:09:11 -0500 (EST) From: Nicolas Pitre <nicolas.pitre@linaro.org> To: Russell King <linux@arm.linux.org.uk>, Catalin Marinas <catalin.marinas@arm.com>, Benjamin Herrenschmidt <benh@kernel.crashing.org>, Paul Mundt <lethal@linux-sh.org>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, Peter Zijlstra <peterz@infradead.org>, "Rafael J. Wysocki" <rjw@rjwysocki.net>, Daniel Lezcano <daniel.lezcano@linaro.org> Subject: [PATCH 4/9] idle: move the cpuidle entry point to the generic idle loop Date: Mon, 27 Jan 2014 01:08:19 -0500 Message-id: <1390802904-28399-5-git-send-email-nicolas.pitre@linaro.org> X-Mailer: git-send-email 1.8.4.108.g55ea5f6 In-reply-to: <1390802904-28399-1-git-send-email-nicolas.pitre@linaro.org> References: <1390802904-28399-1-git-send-email-nicolas.pitre@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140127_010940_523024_1D6E8D1C X-CRM114-Status: GOOD ( 12.66 ) X-Spam-Score: -1.2 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [24.201.245.36 listed in list.dnswl.org] 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <patchwork-forward.linaro.org> List-Unsubscribe: <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe>, <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> MIME-Version: 1.0 Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: nicolas.pitre@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.43 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
diff --git a/kernel/cpu/idle.c b/kernel/cpu/idle.c index 4e327e211b..a6f40ad9f8 100644 --- a/kernel/cpu/idle.c +++ b/kernel/cpu/idle.c @@ -3,6 +3,7 @@ */ #include <linux/sched.h> #include <linux/cpu.h> +#include <linux/cpuidle.h> #include <linux/tick.h> #include <linux/mm.h> #include <linux/stackprotector.h> @@ -94,7 +95,8 @@ static void cpu_idle_loop(void) if (!current_clr_polling_and_test()) { stop_critical_timings(); rcu_idle_enter(); - arch_cpu_idle(); + if (cpuidle_idle_call()) + arch_cpu_idle(); WARN_ON_ONCE(irqs_disabled()); rcu_idle_exit(); start_critical_timings();
In order to integrate cpuidle with the scheduler, we must have a better proximity in the core code with what cpuidle is doing and not delegate such interaction to arch code. Architectures implementing arch_cpu_idle() should simply enter a cheap idle mode in the absence of a proper cpuidle driver. Signed-off-by: Nicolas Pitre <nico@linaro.org> --- kernel/cpu/idle.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)