From patchwork Fri Mar 29 10:31:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 15765 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 760F123DEE for ; Fri, 29 Mar 2013 10:31:53 +0000 (UTC) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by fiordland.canonical.com (Postfix) with ESMTP id 30ADCA18D04 for ; Fri, 29 Mar 2013 10:31:53 +0000 (UTC) Received: by mail-vc0-f170.google.com with SMTP id lf10so379270vcb.15 for ; Fri, 29 Mar 2013 03:31:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=ANivlJLTun0RcZthLscXHOudPQa+QY5DqecKU52AIUc=; b=Jv9mzCyjNLX4YzmxbPdUWgKLWvFicUVsTSD+RCv8ffewRabVnNzZ25sSuIiOf7sTiV B3TJtiRhhcYNkayLeoCLCmd3lq59HFN0kmmU4WAOpD++vEo7zVfrjU832Tz9o1I+ZQxB DhGceGCfNLR/jwFVT7s0a7iOX3R6lKskQGGw/IE+vEvGP7UJ4wYFOxG7Zl7Js1Ng2goy FC1WseQzz34QUQ/+BTZ1VE5pEsv2rOztqmHiBqOOTBD8IMXNZI00CwAdhuchMytsE1ZZ FFZI/t5tEyPo9v+BTDuguQAzJMwDyABBZ+JUIP9hCQJnSB50giGHkC5TWudwqau0/bIy raxg== X-Received: by 10.58.253.33 with SMTP id zx1mr1370524vec.35.1364553112663; Fri, 29 Mar 2013 03:31:52 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.59.4.204 with SMTP id cg12csp54149ved; Fri, 29 Mar 2013 03:31:52 -0700 (PDT) X-Received: by 10.180.188.3 with SMTP id fw3mr2625652wic.33.1364553111821; Fri, 29 Mar 2013 03:31:51 -0700 (PDT) Received: from mail-wi0-x229.google.com ([2a00:1450:400c:c05::229]) by mx.google.com with ESMTPS id l6si877797wja.193.2013.03.29.03.31.51 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 29 Mar 2013 03:31:51 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c05::229 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=2a00:1450:400c:c05::229; Authentication-Results: mx.google.com; spf=neutral (google.com: 2a00:1450:400c:c05::229 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) smtp.mail=daniel.lezcano@linaro.org Received: by mail-wi0-f169.google.com with SMTP id c10so359178wiw.0 for ; Fri, 29 Mar 2013 03:31:51 -0700 (PDT) X-Received: by 10.180.19.39 with SMTP id b7mr21692098wie.15.1364553111419; Fri, 29 Mar 2013 03:31:51 -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 q13sm2472076wie.0.2013.03.29.03.31.49 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 29 Mar 2013 03:31:50 -0700 (PDT) From: Daniel Lezcano To: rjw@sisk.pl Cc: linux-pm@vger.kernel.org, patches@linaro.org, linaro-kernel@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux@arm.linux.org.uk, rnayak@ti.com, swarren@wwwdotorg.org, linux-tegra@vger.kernel.org, horms+renesas@verge.net.au, santosh.shilimkar@ti.com, arnd@arndb.de, lenb@kernel.org, nsekhar@ti.com Subject: [PATCH 7/9] ARM: davinci: cpuidle: fix wrong enter function Date: Fri, 29 Mar 2013 11:31:33 +0100 Message-Id: <1364553095-25110-7-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1364553095-25110-1-git-send-email-daniel.lezcano@linaro.org> References: <1364553095-25110-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQmHN3Wqvh60CC1VyskazUwgVngwXdCSGzaxCZsO0wibfs6soXvsdk9VblwTdp1fSL0t7z5e 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 --- 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;