Skip to contentSkip to conversation

cpufreq/linux/arch/i386/kernel/cpufreq speedstep-smi.c,1.1,1.2

PATCH Ducrot Bruno 1 participant 1 message Sep 4, 2003

lore
Share & tools
lore
#0 lore raw

Update of /mnt/src/cvsroot/cpufreq/linux/arch/i386/kernel/cpufreq In directory flint:/tmp/cvs-serv14334

Modified Files:
speedstep-smi.c
Log Message:
fix IST signature if both smi_cmd, smi_cmd are passed, but the bios vendor forget int15.

Index: speedstep-smi.c
===================================================================
RCS file: /mnt/src/cvsroot/cpufreq/linux/arch/i386/kernel/cpufreq/speedstep-smi.c,v retrieving revision 1.1
retrieving revision 1.2

speedstep-smi.c +7 -4
diff -u -r1.1 -r1.2
@@ -28,6 +28,7 @@
  * If user gives it, these are used.
  * 
  */
+static int		signature	= 0;
 static int		smi_port	= 0;
 static int		smi_cmd		= 0;
 
@@ -70,7 +71,7 @@
         u32     function = GET_SPEEDSTEP_OWNER;
 	unsigned char magic_data[] = "Copyright (c) 1999 Intel Corporation";
 
-        command = (ist_info.signature & 0xffffff00) | (smi_cmd & 0xff);
+        command = (signature & 0xffffff00) | (smi_cmd & 0xff);
 	magic = virt_to_phys(magic_data);
 
         __asm__ __volatile__(
@@ -91,7 +92,7 @@
         u32     state=0;
         u32	function = GET_SPEEDSTEP_FREQS;
 
-        command = (ist_info.signature & 0xffffff00) | (smi_cmd & 0xff);
+        command = (signature & 0xffffff00) | (smi_cmd & 0xff);
 
         __asm__ __volatile__("movl $0, %%edi\n"
             "out %%al, (%%dx)\n"
@@ -113,7 +114,7 @@
 	u32		function=GET_SPEEDSTEP_STATE;
 	u32		result, state, edi, command;
 
-        command = (ist_info.signature & 0xffffff00) | (smi_cmd & 0xff);
+        command = (signature & 0xffffff00) | (smi_cmd & 0xff);
 
         __asm__ __volatile__("movl $0, %%edi\n"
             "out %%al, (%%dx)\n"
@@ -153,7 +154,7 @@
 	/* Disable IRQs */
 	local_irq_save(flags);
 
-        command = (ist_info.signature & 0xffffff00) | (smi_cmd & 0xff);
+        command = (signature & 0xffffff00) | (smi_cmd & 0xff);
         __asm__ __volatile__(
 	    "movl $0, %%edi\n"
             "out %%al, (%%dx)\n"
@@ -309,6 +310,8 @@
 	if ((ist_info.signature !=  0x47534943) && ( 
 	    (smi_port == 0) || (smi_cmd == 0)))
 		return -ENODEV;
+
+	signature = 0x47534943;
 
 	/* setup smi_port from MODLULE_PARM or BIOS */
 	if ((smi_port > 0xff) || (smi_port < 0)) {