From patchwork Mon May 11 01:36:01 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhang, Rui" X-Patchwork-Id: 22834 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 n4B1ZTC4015160 for ; Mon, 11 May 2009 01:35:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757081AbZEKBfb (ORCPT ); Sun, 10 May 2009 21:35:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757167AbZEKBfb (ORCPT ); Sun, 10 May 2009 21:35:31 -0400 Received: from mga11.intel.com ([192.55.52.93]:23620 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757081AbZEKBfb (ORCPT ); Sun, 10 May 2009 21:35:31 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 10 May 2009 18:29:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.40,325,1239001200"; d="scan'208";a="689239490" Received: from rzhang-dt.sh.intel.com (HELO [10.239.36.94]) ([10.239.36.94]) by fmsmga001.fm.intel.com with ESMTP; 10 May 2009 18:39:04 -0700 Subject: [PATCH 2/2] ACPI processor: reset the throttling state once it's invalid From: Zhang Rui To: Len Brown Cc: linux-acpi , "Zhang, Rui" , theholyettlz@googlemail.com Date: Mon, 11 May 2009 09:36:01 +0800 Message-Id: <1242005761.15284.120.camel@rzhang-dt> Mime-Version: 1.0 X-Mailer: Evolution 2.22.1 (2.22.1-2.fc9) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Reset the throttling state once we find that it's invalid. http://bugzilla.kernel.org/show_bug.cgi?id=13259 Signed-off-by: Zhang Rui Tested-by: James Ettle --- drivers/acpi/processor_throttling.c | 8 ++++++++ 1 file changed, 8 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-2.6/drivers/acpi/processor_throttling.c =================================================================== --- linux-2.6.orig/drivers/acpi/processor_throttling.c +++ linux-2.6/drivers/acpi/processor_throttling.c @@ -840,6 +840,14 @@ static int acpi_processor_get_throttling ret = acpi_read_throttling_status(pr, &value); if (ret >= 0) { state = acpi_get_throttling_state(pr, value); + if (state == -1) { + ACPI_WARNING((AE_INFO, + "Invalid throttling state, reset\n")); + state = 0; + ret = acpi_processor_set_throttling(pr, state); + if (ret) + return ret; + } pr->throttling.state = state; }