From patchwork Mon Jul 26 23:51:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 114411 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6QNpuJS032318 for ; Mon, 26 Jul 2010 23:51:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752729Ab0GZXvz (ORCPT ); Mon, 26 Jul 2010 19:51:55 -0400 Received: from vms173003pub.verizon.net ([206.46.173.3]:56379 "EHLO vms173003pub.verizon.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752411Ab0GZXvy (ORCPT ); Mon, 26 Jul 2010 19:51:54 -0400 Received: from localhost.localdomain ([unknown] [64.140.212.33]) by vms173003.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0L66007JJVLX0K93@vms173003.mailsrvcs.net>; Mon, 26 Jul 2010 18:51:50 -0500 (CDT) Received: from localhost.localdomain (x980 [127.0.0.1]) by localhost.localdomain (8.14.4/8.14.4) with ESMTP id o6QNpV6N026560; Mon, 26 Jul 2010 19:51:31 -0400 Received: from localhost (lenb@localhost) by localhost.localdomain (8.14.4/8.14.4/Submit) with ESMTP id o6QNpTjU026555; Mon, 26 Jul 2010 19:51:30 -0400 X-Authentication-warning: localhost.localdomain: lenb owned process doing -bs Date: Mon, 26 Jul 2010 19:51:29 -0400 (EDT) From: Len Brown X-X-Sender: lenb@localhost.localdomain To: stable@kernel.org Cc: Linux Kernel Mailing List , linux-acpi@vger.kernel.org Subject: [PATCH 2.6.{32, 33, 34}.stable] ACPI: skip checking BM_STS if the BIOS doesn't ask for it 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]); Mon, 26 Jul 2010 23:51:56 +0000 (UTC) Index: linux-2.6.32.y/arch/x86/kernel/acpi/cstate.c =================================================================== --- linux-2.6.32.y.orig/arch/x86/kernel/acpi/cstate.c +++ linux-2.6.32.y/arch/x86/kernel/acpi/cstate.c @@ -145,6 +145,15 @@ int acpi_processor_ffh_cstate_probe(unsi percpu_entry->states[cx->index].eax = cx->address; percpu_entry->states[cx->index].ecx = MWAIT_ECX_INTERRUPT_BREAK; } + + /* + * For _CST FFH on Intel, if GAS.access_size bit 1 is cleared, + * then we should skip checking BM_STS for this C-state. + * ref: "Intel Processor Vendor-Specific ACPI Interface Specification" + */ + if ((c->x86_vendor == X86_VENDOR_INTEL) && !(reg->access_size & 0x2)) + cx->bm_sts_skip = 1; + return retval; } EXPORT_SYMBOL_GPL(acpi_processor_ffh_cstate_probe); Index: linux-2.6.32.y/drivers/acpi/processor_idle.c =================================================================== --- linux-2.6.32.y.orig/drivers/acpi/processor_idle.c +++ linux-2.6.32.y/drivers/acpi/processor_idle.c @@ -962,7 +962,7 @@ static int acpi_idle_enter_bm(struct cpu if (acpi_idle_suspend) return(acpi_idle_enter_c1(dev, state)); - if (acpi_idle_bm_check()) { + if (!cx->bm_sts_skip && acpi_idle_bm_check()) { if (dev->safe_state) { dev->last_state = dev->safe_state; return dev->safe_state->enter(dev, dev->safe_state); Index: linux-2.6.32.y/include/acpi/processor.h =================================================================== --- linux-2.6.32.y.orig/include/acpi/processor.h +++ linux-2.6.32.y/include/acpi/processor.h @@ -48,7 +48,7 @@ struct acpi_power_register { u8 space_id; u8 bit_width; u8 bit_offset; - u8 reserved; + u8 access_size; u64 address; } __attribute__ ((packed)); @@ -74,6 +74,7 @@ struct acpi_processor_cx { u32 power; u32 usage; u64 time; + u8 bm_sts_skip; struct acpi_processor_cx_policy promotion; struct acpi_processor_cx_policy demotion; char desc[ACPI_CX_DESC_LEN];