View | Details | Raw Unified | Return to bug 1422 | Differences between
and this patch

Collapse All | Expand All

(-)speedstep-smi.orig (-7 / +22 lines)
Lines 299-337 Link Here
299
{
299
{
300
    struct cpuinfo_x86 *c = cpu_data;
300
    struct cpuinfo_x86 *c = cpu_data;
301
301
302
    printk("SPEEDSTEP_DEBUG: #1\n");
302
    if (c->x86_vendor != X86_VENDOR_INTEL) {
303
    if (c->x86_vendor != X86_VENDOR_INTEL) {
304
    	printk("SPEEDSTEP_DEBUG: #1a\n");
303
		printk (KERN_INFO PFX "No Intel CPU detected.\n");
305
		printk (KERN_INFO PFX "No Intel CPU detected.\n");
304
		return -ENODEV;
306
		return -ENODEV;
305
	}
307
	}
306
308
307
	dprintk(KERN_DEBUG PFX "signature:0x%.8lx, command:0x%.8lx, event:0x%.8lx, perf_level:0x%.8lx.\n", 
309
	printk("signature:0x%.8lx, command:0x%.8lx, event:0x%.8lx, perf_level:0x%.8lx.\n", 
308
		ist_info.signature, ist_info.command, ist_info.event, ist_info.perf_level);
310
		ist_info.signature, ist_info.command, ist_info.event, ist_info.perf_level);
311
//	dprintk(KERN_DEBUG PFX "signature:0x%.8lx, command:0x%.8lx, event:0x%.8lx, perf_level:0x%.8lx.\n", 
312
//		ist_info.signature, ist_info.command, ist_info.event, ist_info.perf_level);
309
313
310
314
311
	/* Error if no IST-SMI BIOS or no PARM 
315
	/* Error if no IST-SMI BIOS or no PARM 
312
		 sig= 'ISGE' aka 'Intel Speedstep Gate E' */
316
		 sig= 'ISGE' aka 'Intel Speedstep Gate E' */
317
    	printk("SPEEDSTEP_DEBUG: #2\n");
313
	if ((ist_info.signature !=  0x47534943) && ( 
318
	if ((ist_info.signature !=  0x47534943) && ( 
314
	    (smi_port == 0) || (smi_cmd == 0)))
319
	    (smi_port == 0) || (smi_cmd == 0))) {
320
    		printk("SPEEDSTEP_DEBUG: #2a\n");
315
		return -ENODEV;
321
		return -ENODEV;
316
322
	}
317
	if (smi_sig == 1)
323
    	printk("SPEEDSTEP_DEBUG: #3\n");
324
	if (smi_sig == 1) {
325
    		printk("SPEEDSTEP_DEBUG: #3a\n");
318
		smi_sig = 0x47534943;
326
		smi_sig = 0x47534943;
319
	else
327
	} else {
328
    		printk("SPEEDSTEP_DEBUG: #3b\n");
320
		smi_sig = ist_info.signature;
329
		smi_sig = ist_info.signature;
321
330
	}
331
    	printk("SPEEDSTEP_DEBUG: #4\n");
322
	/* setup smi_port from MODLULE_PARM or BIOS */
332
	/* setup smi_port from MODLULE_PARM or BIOS */
323
	if ((smi_port > 0xff) || (smi_port < 0)) {
333
	if ((smi_port > 0xff) || (smi_port < 0)) {
334
    		printk("SPEEDSTEP_DEBUG: #4a\n");
324
		return -EINVAL;
335
		return -EINVAL;
325
	} else if (smi_port == 0) {
336
	} else if (smi_port == 0) {
337
    		printk("SPEEDSTEP_DEBUG: #5b\n");
326
		smi_port = ist_info.command & 0xff;
338
		smi_port = ist_info.command & 0xff;
327
	}
339
	}
328
340
341
    	printk("SPEEDSTEP_DEBUG: #6\n");
329
	if ((smi_cmd > 0xff) || (smi_cmd < 0)) {
342
	if ((smi_cmd > 0xff) || (smi_cmd < 0)) {
343
    		printk("SPEEDSTEP_DEBUG: #6a\n");
330
		return -EINVAL;
344
		return -EINVAL;
331
	} else if (smi_cmd == 0) {
345
	} else if (smi_cmd == 0) {
346
    		printk("SPEEDSTEP_DEBUG: #6b\n");
332
		smi_cmd = (ist_info.command >> 16) & 0xff;
347
		smi_cmd = (ist_info.command >> 16) & 0xff;
333
	}
348
	}
334
349
    	printk("SPEEDSTEP_DEBUG: #7\n");
335
	return cpufreq_register_driver(&speedstep_driver);
350
	return cpufreq_register_driver(&speedstep_driver);
336
}
351
}
337
352

Return to bug 1422