cpufreq Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dominik Brodowski <linux@dominikbrodowski.de>
To: davej@codemonkey.org.uk, cpufreq@www.linux.org.uk
Subject: [PATCH] speedstep-smi: only allow it to run on mobile Intel Pentium III
Date: Fri, 3 Sep 2004 18:00:43 +0200	[thread overview]
Message-ID: <20040903160043.GA8523@dominikbrodowski.de> (raw)

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;
 	}

             reply	other threads:[~2004-09-03 16:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-03 16:00 Dominik Brodowski [this message]
2004-09-03 20:24 ` [PATCH] speedstep-smi: only allow it to run on mobile Intel Pentium III Dave Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040903160043.GA8523@dominikbrodowski.de \
    --to=linux@dominikbrodowski.de \
    --cc=cpufreq@www.linux.org.uk \
    --cc=davej@codemonkey.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox