All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] speedstep-centrino: ignore 0xffff'ed P-States
@ 2004-07-30 15:50 Dominik Brodowski
  0 siblings, 0 replies; only message in thread
From: Dominik Brodowski @ 2004-07-30 15:50 UTC (permalink / raw)
  To: cpufreq, davej; +Cc: jeremy

Some ACPI tables contain 0xffff'ed entries for "P-States". This is 
obviously incorrect according to the ACPI specifications, nonetheless
it should "just work". So, simply ignore such invalid P-States instead
of aborting. Thanks to Frederik Reiss for testing (and fixing) this 
patch.

Signed-off-by: Dominik Brodowski <linux@brodo.de>

diff -ruN linux-original/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c linux/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
--- linux-original/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c	2004-07-28 19:02:28.271709968 +0200
+++ linux/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c	2004-07-28 19:38:19.307702792 +0200
@@ -347,6 +347,12 @@
 			goto err_unreg;
 		}
 
+		if (p.states[i].core_frequency > p.states[0].core_frequency) {
+			printk(KERN_DEBUG "P%u has larger frequency than P0, skipping\n", i);
+			p.states[i].core_frequency = 0;
+			continue;
+		}
+
 		if (extract_clock(p.states[i].control) != 
 		    (p.states[i].core_frequency * 1000)) {
 			printk(KERN_DEBUG "Invalid encoded frequency\n");
@@ -378,6 +384,8 @@
 		centrino_model->op_points[i].frequency = p.states[i].core_frequency * 1000;
 		if (cur_freq == centrino_model->op_points[i].frequency)
 			p.state = i;
+		if (!p.states[i].core_frequency)
+			centrino_model->op_points[i].frequency = CPUFREQ_ENTRY_INVALID;
 	}
 	centrino_model->op_points[p.state_count].frequency = CPUFREQ_TABLE_END;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-07-30 15:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-30 15:50 [PATCH] speedstep-centrino: ignore 0xffff'ed P-States Dominik Brodowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.