Skip to contentSkip to conversation

speedstep-smi detection broken.

PATCH Dave Jones 2 participants 4 messages Oct 17, 2006 – Oct 18, 2006

lore
Share & tools
lore

Dave Jones

author
#0 lore raw

If someone inserts speedstep-smi on a mobile P4, it prevents other cpufreq modules from loading until it is unloaded.

Opinions on this patch ?
(I'm tempted to just remove the printk too).

Dave

arch/i386/kernel/cpu/cpufreq/speedstep-smi.c renamed from arch/i386/kernel/cpu/cpufreq/speedstep-smi.c~ +1 -1
@@ -362,7 +362,7 @@ static int __init speedstep_init(void)
 		break;
 	case SPEEDSTEP_PROCESSOR_P4M:
 		printk(KERN_INFO "speedstep-smi: you're trying to use this cpufreq driver on a Pentium 4-based CPU. Most likely it will not work.\n");
-		break;
+		return -ENODEV;
 	default:
 		speedstep_processor = 0;
 	}
Signature · 1 line
http://www.codemonkey.org.uk
#1 lore raw

I prefer removing all of P4M case block if you remove the printk too. This means simply not to support P4M with this driver and return -ENODEV.
If user turn on debug flag, they may see

	dprintk ("No supported Intel CPU detected.\n");

as same as other CPUs.

Hiroshi

--- linux-2.6.18/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c~ 2006-09-20
12:42:06.000000000 +0900
+++ linux-2.6.18/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c 2006-10-17
22:59:50.553975632 +0900
@@ -360,9 +360,6 @@

	case SPEEDSTEP_PROCESSOR_PIII_C:
	case SPEEDSTEP_PROCESSOR_PIII_C_EARLY:
		break;
-	case SPEEDSTEP_PROCESSOR_P4M:
-		printk(KERN_INFO "speedstep-smi: you're trying to use this cpufreq
driver on a Pentium 4-based CPU. Most likely it will not work.\n");
-		break;
	default:
		speedstep_processor = 0;
	}

2006/10/17, Dave Jones <[email protected]>:

Quoted 25 lines

If someone inserts speedstep-smi on a mobile P4, it prevents other cpufreq modules from loading until it is unloaded.

Opinions on this patch ?
(I'm tempted to just remove the printk too).

Dave

arch/i386/kernel/cpu/cpufreq/speedstep-smi.c 2006-10-17 01:54:02.000000000 -0400 renamed from arch/i386/kernel/cpu/cpufreq/speedstep-smi.c~ 2006-10-17 01:53:29.000000000 -0400 +1 -2
@@ -362,7 +362,7 @@ static int __init speedstep_init(void)
                break;
        case SPEEDSTEP_PROCESSOR_P4M:
                printk(KERN_INFO "speedstep-smi: you're trying to use this cpufreq driver on a Pentium 4-based CPU. Most likely it will not work.\n");
-               break;
+               return -ENODEV;
        default:
                speedstep_processor = 0;
        }
 
 
--

http://www.codemonkey.org.uk

Signature · 1 line
HIroshi Miura
author
#2 lore raw
Quoted 6 lines · Hiroshi Miura

I prefer removing all of P4M case block if you remove the printk too. This means simply not to support P4M with this driver and return -ENODEV.
If user turn on debug flag, they may see

	dprintk ("No supported Intel CPU detected.\n");

as same as other CPUs.

Yes, even better. I'll apply this.
Want me to fake a Signed-off-by: from you, as you forgot to add one? :)

Dave

Signature · 1 line
http://www.codemonkey.org.uk
#3 lore raw

2006/10/18, Dave Jones <[email protected]>:

Quoted 10 lines · Hiroshi Miura
Quoted 6 lines

I prefer removing all of P4M case block if you remove the printk too. This means simply not to support P4M with this driver and return -ENODEV.
If user turn on debug flag, they may see

     dprintk ("No supported Intel CPU detected.\n");

as same as other CPUs.

Yes, even better. I'll apply this.
Want me to fake a Signed-off-by: from you, as you forgot to add one? :)

Exactly I forgot, sorry.

Hiroshi

--- linux-2.6.18/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c~ 2006-09-20 12:42:06.000000000 +0900
+++ linux-2.6.18/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c 2006-10-17
22:59:50.553975632 +0900
@@ -360,9 +360,6 @@

      case SPEEDSTEP_PROCESSOR_PIII_C:
      case SPEEDSTEP_PROCESSOR_PIII_C_EARLY:
              break;

- case SPEEDSTEP_PROCESSOR_P4M:
- printk(KERN_INFO "speedstep-smi: you're trying to use
this cpufreq driver on a Pentium 4-based CPU. Most likely it will not work.\n");

-               break;
      default:
              speedstep_processor = 0;
      }
Signature · 1 line
HIroshi Miura