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: 233424 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id D0EAA2C00B8 for ; Wed, 3 Apr 2013 23:15:44 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759519Ab3DCMPn (ORCPT ); Wed, 3 Apr 2013 08:15:43 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:53189 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760626Ab3DCMPm (ORCPT ); Wed, 3 Apr 2013 08:15:42 -0400 Received: by mail-wi0-f173.google.com with SMTP id ez12so3547623wid.12 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=hgjHxZtMGwEkZFxcEn3W+QWYSOHazxSn3FOo58ZYH4WCk639+u0fOFZiU44tN3rARR UCX0aBB0tCfrT0e0YpBz8Nsrk7FZBB5GkjoPwqO1fcA5UReaC3fb72+3Ng9xj0/RACef rM4FYsW+RM7ithTE9a7Gkqga2H94OFRnVzR0eDwWRXg/PmT7PPz//o8T+h3rE1cwdRF8 uPUzJSXiRtCF8r4MESBlkA5kTbw4WUSWOdVHoGePQKFVwKrC71wlzHIxfPJ1jwyIFAbK 66/dTRWHPKxDrBLsCK4gkWbjvr38Rzl20U37ES6sVXIg9RnoxH7a/DckaTffZQ5oQEjH GEHQ== 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: ALoCoQkkqh9st/XJKb7Ir2riPOw78OB0x/i5ooEnpdcFF624tHzTp+JlbYip/rZnFSX6JVC3X5zF Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.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;