From patchwork Wed Apr 3 12:15:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 2386661 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 2D05F3FD8C for ; Wed, 3 Apr 2013 12:19:47 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UNMcj-0000U2-JY; Wed, 03 Apr 2013 12:17:05 +0000 Received: from mail-wg0-f51.google.com ([74.125.82.51]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UNMbP-0008Mn-5t for linux-arm-kernel@lists.infradead.org; Wed, 03 Apr 2013 12:15:44 +0000 Received: by mail-wg0-f51.google.com with SMTP id b12so1468906wgh.6 for ; Wed, 03 Apr 2013 05:15:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=YcAlxHYjnOHuljsWawSgiEPCNJ0v3K1bxXMoo6alyeI=; b=mY3Qy3H3yCHpucS35W8/OcvJLsPYttAKb0A4iPRMz0VWfLeUQ2ftTwDbGDbOGi1BQz muKGhAbejYoXRjlYlyGa41iK18vXK7L5/zG6Oj7BLXkqAE89n/Iz7Lo32gYHk4iafe3R 7s4iwlqG86z3ba0qCG36PtKFSkm6DWsPrAwyyKM0wtNqco6zyrcEYOcxGw1eKMrHolHW 0bhxbxN08q874ROEMPJibtZuG6R0Q0uO5IRPUADkGgq1EdM2mlPLeoG175d/M63/8edt RvtxHUtGUYwgAlYKXs7gdsV1SEgkuc1G4TLSVCfu68MfidTiHt+PEWcjNscRMmcFteMC qPHw== X-Received: by 10.194.172.71 with SMTP id ba7mr2475625wjc.26.1364991341022; Wed, 03 Apr 2013 05:15:41 -0700 (PDT) Received: from mai.home (AToulouse-654-1-486-7.w92-146.abo.wanadoo.fr. [92.146.77.7]) by mx.google.com with ESMTPS id bq19sm8729530wib.7.2013.04.03.05.15.38 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Apr 2013 05:15:39 -0700 (PDT) From: Daniel Lezcano To: rjw@sisk.pl Subject: [PATCH 6/9] ARM: davinci: cpuidle: fix wrong enter function Date: Wed, 3 Apr 2013 14:15:19 +0200 Message-Id: <1364991322-20585-6-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1364991322-20585-1-git-send-email-daniel.lezcano@linaro.org> References: <1364991322-20585-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQkoVfyzJOscgQajxo3B0RFY8MagdskqZuJ0mDB0EgV5z8ViCxHg7ciHXq3HiGEo1rPWNMHn X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130403_081543_364089_5D45CAB5 X-CRM114-Status: GOOD ( 11.27 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.51 listed in list.dnswl.org] 1.7 KHOP_BIG_TO_CC Sent to 10+ recipients instaed of Bcc or a list -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: deepthi@linux.vnet.ibm.com, linaro-kernel@lists.linaro.org, linux@arm.linux.org.uk, arnd@arndb.de, swarren@wwwdotorg.org, patches@linaro.org, linux-pm@vger.kernel.org, rnayak@ti.com, nsekhar@ti.com, santosh.shilimkar@ti.com, josephl@nvidia.com, linux-tegra@vger.kernel.org, horms+renesas@verge.net.au, linux-arm-kernel@lists.infradead.org, lenb@kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The davinci_enter_idle is called from the cpuidle with the cpuidle_wrap_enter function. This one does the time compution for entering and exiting the idle function and then we call again cpuidle_wrap_enter for cpu_do_idle. This is wrong, we are calling recursively cpuidle_wrap_enter for nothing and furthermore reenabling the local irq. Remove this and replace it by the cpu_do_idle function. Signed-off-by: Daniel Lezcano Acked-by: Santosh Shilimkar Acked-by: Sekhar Nori --- arch/arm/mach-davinci/cpuidle.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-davinci/cpuidle.c b/arch/arm/mach-davinci/cpuidle.c index 5ac9e93..22d6d4a 100644 --- a/arch/arm/mach-davinci/cpuidle.c +++ b/arch/arm/mach-davinci/cpuidle.c @@ -50,14 +50,10 @@ static void davinci_save_ddr_power(int enter, bool pdown) /* Actual code that puts the SoC in different idle states */ static int davinci_enter_idle(struct cpuidle_device *dev, - struct cpuidle_driver *drv, - int index) + struct cpuidle_driver *drv, int index) { davinci_save_ddr_power(1, ddr2_pdown); - - index = cpuidle_wrap_enter(dev, drv, index, - arm_cpuidle_simple_enter); - + cpu_do_idle(); davinci_save_ddr_power(0, ddr2_pdown); return index;