cpufreq Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] speedstep-smi: only allow it to run on mobile Intel Pentium III
@ 2004-09-03 16:00 Dominik Brodowski
  2004-09-03 20:24 ` Dave Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Brodowski @ 2004-09-03 16:00 UTC (permalink / raw)
  To: davej, cpufreq

speedstep-smi only makes sense on Intel mobile Pentium III systems.
So, unify the distributed checks for speedstep_processor there,
and disallow P4s.

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

 arch/i386/kernel/cpu/cpufreq/speedstep-smi.c |   25 ++++++++++++-------------
 1 files changed, 12 insertions(+), 13 deletions(-)

diff -ruN linux-original/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c linux/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c
--- linux-original/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c	2004-08-30 22:50:56.000000000 +0200
+++ linux/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c	2004-09-03 17:56:57.460143128 +0200
@@ -260,12 +260,6 @@
 	if (result) {
 		/* fall back to speedstep_lib.c dection mechanism: try both states out */
 		dprintk(KERN_INFO PFX "could not detect low and high frequencies by SMI call.\n");
-		if (!speedstep_processor)
-			speedstep_processor = speedstep_detect_processor();
-
-		if (!speedstep_processor)
-			return -ENODEV;
-
 		result = speedstep_get_freqs(speedstep_processor,
 				&speedstep_freqs[SPEEDSTEP_LOW].frequency,
 				&speedstep_freqs[SPEEDSTEP_HIGH].frequency,
@@ -310,10 +304,6 @@
 {
 	if (cpu)
 		return -ENODEV;
-	if (!speedstep_processor)
-		speedstep_processor = speedstep_detect_processor();
-	if (!speedstep_processor)
-		return 0;
 	return speedstep_get_processor_frequency(speedstep_processor);
 }
 
@@ -354,10 +344,19 @@
  */
 static int __init speedstep_init(void)
 {
-    struct cpuinfo_x86 *c = cpu_data;
+	speedstep_processor = speedstep_detect_processor();
+
+	switch (speedstep_processor) {
+	case SPEEDSTEP_PROCESSOR_PIII_T:
+        case SPEEDSTEP_PROCESSOR_PIII_C:
+        case SPEEDSTEP_PROCESSOR_PIII_C_EARLY:
+		break;
+	default:
+		speedstep_processor = 0;
+	}
 
-    if (c->x86_vendor != X86_VENDOR_INTEL) {
-		printk (KERN_INFO PFX "No Intel CPU detected.\n");
+	if (!speedstep_processor) {
+		dprintk (KERN_INFO PFX "No supported Intel CPU detected.\n");
 		return -ENODEV;
 	}

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

end of thread, other threads:[~2004-09-03 20:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-03 16:00 [PATCH] speedstep-smi: only allow it to run on mobile Intel Pentium III Dominik Brodowski
2004-09-03 20:24 ` Dave Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox