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: 15859 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 8F64723E21 for ; Wed, 3 Apr 2013 12:15:43 +0000 (UTC) Received: from mail-gh0-f200.google.com (mail-gh0-f200.google.com [209.85.160.200]) by fiordland.canonical.com (Postfix) with ESMTP id 184EBA1866B for ; Wed, 3 Apr 2013 12:15:43 +0000 (UTC) Received: by mail-gh0-f200.google.com with SMTP id 10sf1993966ghy.7 for ; Wed, 03 Apr 2013 05:15:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=YcAlxHYjnOHuljsWawSgiEPCNJ0v3K1bxXMoo6alyeI=; b=SSf8KBq58oUOWfum/3c68FJ4rhgOp1DM7VYFRQATlKw+vNufFP6wzmb6sdJYvRukGc ixR+Lo0QjMVl4poohRjTwsJW2HO8PExg19CpAX8K7kOXEYBqXTPYP0llohSzCyLAqxYk dcoS8JVnEXQBfjnfVsD7YrS3rEAphk/JTDpHKK0e10K9tyepwYIJnqUjZdKWpy5uP3tR VO90NO+SXzXx9VexDcBtTXUklAa3BO/r8x7gSrOqCkYdlkVWHK0yuZ2PEfdRdXQaP6oT mVtXbbHuehB/fBoetuM8PCV6I2PH06BTykRrER+hJtFtPp3oHPsBzEByBOMednNKR0Za PwYA== X-Received: by 10.224.219.146 with SMTP id hu18mr1006890qab.3.1364991342614; Wed, 03 Apr 2013 05:15:42 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.41.10 with SMTP id b10ls882962qel.72.gmail; Wed, 03 Apr 2013 05:15:42 -0700 (PDT) X-Received: by 10.220.221.210 with SMTP id id18mr917008vcb.74.1364991342478; Wed, 03 Apr 2013 05:15:42 -0700 (PDT) Received: from mail-vb0-x22e.google.com (mail-vb0-x22e.google.com [2607:f8b0:400c:c02::22e]) by mx.google.com with ESMTPS id o6si4679323vdw.11.2013.04.03.05.15.42 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Apr 2013 05:15:42 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::22e is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::22e; Received: by mail-vb0-f46.google.com with SMTP id 11so381745vbe.33 for ; Wed, 03 Apr 2013 05:15:42 -0700 (PDT) X-Received: by 10.52.93.20 with SMTP id cq20mr843766vdb.38.1364991342394; Wed, 03 Apr 2013 05:15:42 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.59.4.204 with SMTP id cg12csp167615ved; Wed, 3 Apr 2013 05:15:41 -0700 (PDT) X-Received: by 10.194.63.109 with SMTP id f13mr477021wjs.11.1364991341526; Wed, 03 Apr 2013 05:15:41 -0700 (PDT) Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com [74.125.82.54]) by mx.google.com with ESMTPS id u2si4931233wiv.14.2013.04.03.05.15.41 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Apr 2013 05:15:41 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.54 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=74.125.82.54; Received: by mail-wg0-f54.google.com with SMTP id a12so1469282wgh.21 for ; Wed, 03 Apr 2013 05:15:41 -0700 (PDT) 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 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, josephl@nvidia.com, deepthi@linux.vnet.ibm.com 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: ALoCoQkcwZQak5i4Ng6W8DLxxLcogdk+WjUx736LwRFsvWZt6mvLa5rqL6gdQ7KXVvJtUSKZyJTp X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::22e 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 Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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;