linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] acpi: Fix regression where _PPC is not read at boot even when ignore_ppc=0
@ 2009-04-15 22:53 Darrick J. Wong
  2009-04-16  0:27 ` [PATCH v2] " Darrick J. Wong
  0 siblings, 1 reply; 34+ messages in thread
From: Darrick J. Wong @ 2009-04-15 22:53 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar, Thomas Renninger, cpufreq, linux-acpi

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.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
---

 drivers/acpi/processor_perflib.c |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)


diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
index cafb410..0b50e8e 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -150,13 +150,10 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
 	return 0;
 }
 
-int acpi_processor_ppc_has_changed(struct acpi_processor *pr)
+static int __acpi_processor_ppc_has_changed(struct acpi_processor *pr)
 {
 	int ret;
 
-	if (ignore_ppc)
-		return 0;
-
 	ret = acpi_processor_get_platform_limit(pr);
 
 	if (ret < 0)
@@ -165,6 +162,14 @@ int acpi_processor_ppc_has_changed(struct acpi_processor *pr)
 		return cpufreq_update_policy(pr->id);
 }
 
+int acpi_processor_ppc_has_changed(struct acpi_processor *pr)
+{
+	if (ignore_ppc)
+		return 0;
+
+	return __acpi_processor_ppc_has_changed(pr);
+}
+
 void acpi_processor_ppc_init(void)
 {
 	if (!cpufreq_register_notifier
@@ -348,7 +353,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_ppc_has_changed(pr);
+
+	return result;
 
 	/*
 	 * Having _PPC but missing frequencies (_PSS, _PCT) is a very good hint that

^ permalink raw reply related	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2010-02-19  6:12 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-15 22:53 [PATCH] acpi: Fix regression where _PPC is not read at boot even when ignore_ppc=0 Darrick J. Wong
2009-04-16  0:27 ` [PATCH v2] " Darrick J. Wong
2009-04-16 10:01   ` Thomas Renninger
2009-04-16 10:32     ` Ingo Molnar
2009-04-16 17:42     ` Darrick J. Wong
2009-04-16 18:49       ` Thomas Renninger
2009-04-16 22:45       ` Matthew Garrett
2009-04-20  5:13         ` Len Brown
2009-04-20  9:13           ` Thomas Renninger
2009-04-20 10:45             ` Ingo Molnar
2009-04-29 13:19               ` Thomas Renninger
2009-04-29 14:48                 ` Ingo Molnar
2009-04-29 21:43                 ` Darrick J. Wong
2009-04-30  9:07                   ` Thomas Renninger
2009-04-30  9:17                     ` Ingo Molnar
2009-04-20 22:18             ` Henrique de Moraes Holschuh
2009-04-28 19:33         ` Darrick J. Wong
2009-04-28 19:53           ` Matthew Garrett
2009-04-28 20:24             ` Darrick J. Wong
2009-04-29 21:39             ` Darrick J. Wong
2009-04-29 22:00               ` Matthew Garrett
2009-04-30  7:25                 ` Ingo Molnar
2009-04-30  9:54                   ` Matthew Garrett
2009-04-30 11:10                     ` Ingo Molnar
2009-04-30 11:13                       ` Matthew Garrett
2009-05-15 19:12                         ` Darrick J. Wong
2009-06-02 23:21                           ` Darrick J. Wong
2009-06-07 10:05                             ` Ingo Molnar
2009-07-15  0:32                               ` Darrick J. Wong
2010-02-16 22:07                                 ` Matthew Garrett
2010-02-16 22:26                                   ` Darrick J. Wong
2010-02-18  9:02                                     ` Len Brown
2010-02-18 18:28                                       ` Darrick J. Wong
2010-02-19  6:12                                         ` Len Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).