From patchwork Wed Feb 24 03:35:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 81596 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 o1O3ZTQr013461 for ; Wed, 24 Feb 2010 03:35:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755108Ab0BXDf2 (ORCPT ); Tue, 23 Feb 2010 22:35:28 -0500 Received: from vms173009pub.verizon.net ([206.46.173.9]:24821 "EHLO vms173009pub.verizon.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754549Ab0BXDf2 (ORCPT ); Tue, 23 Feb 2010 22:35:28 -0500 Received: from localhost.localdomain ([unknown] [74.104.151.18]) by vms173009.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0KYB0045QTYN6JX0@vms173009.mailsrvcs.net> for linux-acpi@vger.kernel.org; Tue, 23 Feb 2010 21:35:17 -0600 (CST) Received: from localhost.localdomain (d975xbx2 [127.0.0.1]) by localhost.localdomain (8.14.2/8.14.2) with ESMTP id o1O3ZATQ005956; Tue, 23 Feb 2010 22:35:11 -0500 Received: from localhost (lenb@localhost) by localhost.localdomain (8.14.2/8.14.2/Submit) with ESMTP id o1O3ZApV005952; Tue, 23 Feb 2010 22:35:10 -0500 X-Authentication-warning: localhost.localdomain: lenb owned process doing -bs Date: Tue, 23 Feb 2010 22:35:10 -0500 (EST) From: Len Brown X-X-Sender: lenb@localhost.localdomain To: stable@kernel.org Cc: linux-acpi@vger.kernel.org Subject: [PATCH 2.6.30-32.stable] ACPI: Be in TS_POLLING state during mwait based C-state entry Message-id: User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII 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, 24 Feb 2010 03:35:30 +0000 (UTC) diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index e88e8ae..cc978a8 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -880,12 +880,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; @@ -965,12 +967,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;