From patchwork Tue Jan 26 23:35:03 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 75277 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0QNjtvX008440 for ; Tue, 26 Jan 2010 23:45:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754998Ab0AZXpR (ORCPT ); Tue, 26 Jan 2010 18:45:17 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754909Ab0AZXpO (ORCPT ); Tue, 26 Jan 2010 18:45:14 -0500 Received: from kroah.org ([198.145.64.141]:35568 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755004Ab0AZXoa (ORCPT ); Tue, 26 Jan 2010 18:44:30 -0500 Received: from localhost (c-98-246-45-209.hsd1.or.comcast.net [98.246.45.209]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by coco.kroah.org (Postfix) with ESMTPSA id 83EF848DE2; Tue, 26 Jan 2010 15:44:29 -0800 (PST) X-Mailbox-Line: From gregkh@mini.kroah.org Tue Jan 26 15:39:33 2010 Message-Id: <20100126233933.720024657@mini.kroah.org> User-Agent: quilt/0.48-1 Date: Tue, 26 Jan 2010 15:35:03 -0800 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: stable-review@kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, linux-acpi@vger.kernel.org, Len Brown Subject: [97/98] ACPI: enable C2 and Turbo-mode on Nehalem notebooks on A/C In-Reply-To: <20100126233950.GA5372@kroah.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -299,6 +299,17 @@ static int acpi_processor_get_power_info pr->power.states[ACPI_STATE_C2].latency = acpi_gbl_FADT.C2latency; pr->power.states[ACPI_STATE_C3].latency = acpi_gbl_FADT.C3latency; + /* + * FADT specified C2 latency must be less than or equal to + * 100 microseconds. + */ + if (acpi_gbl_FADT.C2latency > ACPI_PROCESSOR_MAX_C2_LATENCY) { + ACPI_DEBUG_PRINT((ACPI_DB_INFO, + "C2 latency too large [%d]\n", acpi_gbl_FADT.C2latency)); + /* invalidate C2 */ + pr->power.states[ACPI_STATE_C2].address = 0; + } + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "lvl2[0x%08x] lvl3[0x%08x]\n", pr->power.states[ACPI_STATE_C2].address, @@ -495,16 +506,6 @@ static void acpi_processor_power_verify_ return; /* - * C2 latency must be less than or equal to 100 - * microseconds. - */ - else if (cx->latency > ACPI_PROCESSOR_MAX_C2_LATENCY) { - ACPI_DEBUG_PRINT((ACPI_DB_INFO, - "latency too large [%d]\n", cx->latency)); - return; - } - - /* * Otherwise we've met all of our C2 requirements. * Normalize the C2 latency to expidite policy */