From patchwork Sat Dec 12 18:14:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Youquan Song X-Patchwork-Id: 66923 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 nBCAdCCC012497 for ; Sat, 12 Dec 2009 10:39:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761471AbZLLKjE (ORCPT ); Sat, 12 Dec 2009 05:39:04 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761525AbZLLKjE (ORCPT ); Sat, 12 Dec 2009 05:39:04 -0500 Received: from mga12.intel.com ([143.182.124.36]:52653 "EHLO azsmga102.ch.intel.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1761471AbZLLKjD (ORCPT ); Sat, 12 Dec 2009 05:39:03 -0500 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 12 Dec 2009 02:39:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,316,1257148800"; d="scan'208";a="221962700" Received: from youquan-linux.bj.intel.com (HELO localhost) ([172.16.182.102]) by azsmga001.ch.intel.com with ESMTP; 12 Dec 2009 02:39:07 -0800 Date: Sat, 12 Dec 2009 13:14:42 -0500 From: "Youquan,Song" To: lenb@kernel.org Cc: venkatesh.pallipadi@intel.com, kent.liu@intel.com, chaohong.guo@intel.com, youquan.song@intel.com, linux-acpi@vger.kernel.org Subject: [PATCH]acpi c-states: Fix ACPI C3 is wrongly mapped to C2 Message-ID: <20091212181442.GA22832@youquan-linux.bj.intel.com> Mime-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.9i Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index bbd066e..302d656 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -459,6 +459,10 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr) cx.power = obj->integer.value; current_count++; + + if (current_count == 2 && cx.type != ACPI_STATE_C2) + current_count++; + memcpy(&(pr->power.states[current_count]), &cx, sizeof(cx)); /*