From patchwork Wed Feb 10 18:35:31 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: venkip X-Patchwork-Id: 78544 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1AIZB3A014826 for ; Wed, 10 Feb 2010 18:35:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756134Ab0BJSfh (ORCPT ); Wed, 10 Feb 2010 13:35:37 -0500 Received: from mga01.intel.com ([192.55.52.88]:26656 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755080Ab0BJSfg (ORCPT ); Wed, 10 Feb 2010 13:35:36 -0500 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 10 Feb 2010 10:33:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.49,445,1262592000"; d="scan'208";a="539597329" Received: from linux-os.sc.intel.com ([172.25.110.8]) by fmsmga002.fm.intel.com with ESMTP; 10 Feb 2010 10:34:58 -0800 Received: by linux-os.sc.intel.com (Postfix, from userid 47009) id 276D828006; Wed, 10 Feb 2010 10:35:31 -0800 (PST) Date: Wed, 10 Feb 2010 10:35:31 -0800 From: "Pallipadi, Venkatesh" To: lenb@kernel.org Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, alex.shi@intel.com, ming.m.lin@intel.com Subject: [PATCH] acpi: Be in TS_POLLING state during mwait based C-state entry Message-ID: <20100210183530.GA5426@linux-os.sc.intel.com> Mime-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.4.1i Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 10 Feb 2010 18:35:38 +0000 (UTC) diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 7c0441f..8abe91a 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -872,12 +872,14 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev, return(acpi_idle_enter_c1(dev, state)); local_irq_disable(); - current_thread_info()->status &= ~TS_POLLING; - /* - * TS_POLLING-cleared state must be visible before we test - * NEED_RESCHED: - */ - smp_mb(); + if (cx->entry_method != ACPI_CSTATE_FFH) { + current_thread_info()->status &= ~TS_POLLING; + /* + * TS_POLLING-cleared state must be visible before we test + * NEED_RESCHED: + */ + smp_mb(); + } if (unlikely(need_resched())) { current_thread_info()->status |= TS_POLLING; @@ -957,12 +959,14 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, } local_irq_disable(); - current_thread_info()->status &= ~TS_POLLING; - /* - * TS_POLLING-cleared state must be visible before we test - * NEED_RESCHED: - */ - smp_mb(); + if (cx->entry_method != ACPI_CSTATE_FFH) { + current_thread_info()->status &= ~TS_POLLING; + /* + * TS_POLLING-cleared state must be visible before we test + * NEED_RESCHED: + */ + smp_mb(); + } if (unlikely(need_resched())) { current_thread_info()->status |= TS_POLLING;