From patchwork Thu Apr 16 00:27:12 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 18434 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 n3G0RQ0M031151 for ; Thu, 16 Apr 2009 00:27:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753690AbZDPA1Q (ORCPT ); Wed, 15 Apr 2009 20:27:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753508AbZDPA1Q (ORCPT ); Wed, 15 Apr 2009 20:27:16 -0400 Received: from e31.co.us.ibm.com ([32.97.110.149]:59066 "EHLO e31.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752574AbZDPA1O (ORCPT ); Wed, 15 Apr 2009 20:27:14 -0400 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e31.co.us.ibm.com (8.13.1/8.13.1) with ESMTP id n3G0NuTC011645; Wed, 15 Apr 2009 18:23:56 -0600 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n3G0RDil226994; Wed, 15 Apr 2009 18:27:13 -0600 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n3G0RDN4012078; Wed, 15 Apr 2009 18:27:13 -0600 Received: from localhost (plum.beaverton.ibm.com [9.47.17.113]) by d03av04.boulder.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n3G0RCES012069; Wed, 15 Apr 2009 18:27:12 -0600 Date: Wed, 15 Apr 2009 17:27:12 -0700 From: "Darrick J. Wong" To: linux-kernel Cc: Ingo Molnar , Thomas Renninger , cpufreq@vger.kernel.org, linux-acpi@vger.kernel.org Subject: [PATCH v2] acpi: Fix regression where _PPC is not read at boot even when ignore_ppc=0 Message-ID: <20090416002712.GX8311@plum> Reply-To: djwong@us.ibm.com References: <20090415225348.GW8311@plum> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20090415225348.GW8311@plum> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Earlier, Ingo Molnar posted a patch to make it so that the kernel would avoid reading _PPC on his broken T60. Unfortunately, it seems that with Thomas Renninger's patch last July to eliminate _PPC evaluations when the processor driver loads, the kernel never actually reads _PPC at all! This is problematic if you happen to boot your non-T60 computer in a state where the BIOS _wants_ _PPC to be something other than zero. So, put the _PPC evaluation back into acpi_processor_get_performance_info if ignore_ppc isn't 1. This second version restores the correct function call, which simplifies the patch. I apologize for the churn and the poor eyesight. Signed-off-by: Darrick J. Wong --- drivers/acpi/processor_perflib.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) -- 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 diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c index cafb410..85af717 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c @@ -348,7 +348,11 @@ static int acpi_processor_get_performance_info(struct acpi_processor *pr) if (result) goto update_bios; - return 0; + /* We need to call _PPC once when cpufreq starts */ + if (ignore_ppc != 1) + result = acpi_processor_get_platform_limit(pr); + + return result; /* * Having _PPC but missing frequencies (_PSS, _PCT) is a very good hint that