From patchwork Fri Oct 23 16:59:08 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 55597 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9NGxmFh026422 for ; Fri, 23 Oct 2009 16:59:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752743AbZJWQ7m (ORCPT ); Fri, 23 Oct 2009 12:59:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752739AbZJWQ7m (ORCPT ); Fri, 23 Oct 2009 12:59:42 -0400 Received: from mail-qy0-f174.google.com ([209.85.221.174]:33893 "EHLO mail-qy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752737AbZJWQ7m (ORCPT ); Fri, 23 Oct 2009 12:59:42 -0400 Received: by mail-qy0-f174.google.com with SMTP id 4so6802363qyk.33 for ; Fri, 23 Oct 2009 09:59:47 -0700 (PDT) Received: by 10.224.101.141 with SMTP id c13mr5554968qao.21.1256317187195; Fri, 23 Oct 2009 09:59:47 -0700 (PDT) Received: from localhost ([216.254.16.51]) by mx.google.com with ESMTPS id 8sm8590241qwj.31.2009.10.23.09.59.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 23 Oct 2009 09:59:46 -0700 (PDT) From: Kevin Hilman To: linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Tero Kristo Subject: [PATCH 10/10] OMAP3: PM: Added resched check into idle calls Date: Fri, 23 Oct 2009 09:59:08 -0700 Message-Id: <1256317148-25506-11-git-send-email-khilman@deeprootsystems.com> X-Mailer: git-send-email 1.6.4.3 In-Reply-To: <1256317148-25506-10-git-send-email-khilman@deeprootsystems.com> References: <1256317148-25506-1-git-send-email-khilman@deeprootsystems.com> <1256317148-25506-2-git-send-email-khilman@deeprootsystems.com> <1256317148-25506-3-git-send-email-khilman@deeprootsystems.com> <1256317148-25506-4-git-send-email-khilman@deeprootsystems.com> <1256317148-25506-5-git-send-email-khilman@deeprootsystems.com> <1256317148-25506-6-git-send-email-khilman@deeprootsystems.com> <1256317148-25506-7-git-send-email-khilman@deeprootsystems.com> <1256317148-25506-8-git-send-email-khilman@deeprootsystems.com> <1256317148-25506-9-git-send-email-khilman@deeprootsystems.com> <1256317148-25506-10-git-send-email-khilman@deeprootsystems.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index 1d10c4a..a26d6a0 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c @@ -22,6 +22,7 @@ * published by the Free Software Foundation. */ +#include #include #include @@ -113,7 +114,7 @@ static int omap3_enter_idle(struct cpuidle_device *dev, pwrdm_set_next_pwrst(mpu_pd, mpu_state); pwrdm_set_next_pwrst(core_pd, core_state); - if (omap_irq_pending()) + if (omap_irq_pending() || need_resched()) goto return_sleep_time; if (cx->type == OMAP3_STATE_C1) { diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 40cbba4..849c910 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -523,7 +523,7 @@ static void omap3_pm_idle(void) if (!omap3_can_sleep()) goto out; - if (omap_irq_pending()) + if (omap_irq_pending() || need_resched()) goto out; omap_sram_idle();