Make cpuid driver preempt safe.

From: davej@codemonkey.org.uk
Date: Mon Mar 24 2003 - 11:41:45 EST


diff -urpN --exclude-from=/home/davej/.exclude bk-linus/arch/i386/kernel/cpuid.c linux-2.5/arch/i386/kernel/cpuid.c
--- bk-linus/arch/i386/kernel/cpuid.c 2003-03-08 09:56:25.000000000 +0000
+++ linux-2.5/arch/i386/kernel/cpuid.c 2003-03-18 21:22:12.000000000 +0000
@@ -64,6 +64,7 @@ static inline void do_cpuid(int cpu, u32
 {
   struct cpuid_command cmd;
   
+ preempt_disable();
   if ( cpu == smp_processor_id() ) {
     cpuid(reg, &data[0], &data[1], &data[2], &data[3]);
   } else {
@@ -73,6 +74,7 @@ static inline void do_cpuid(int cpu, u32
     
     smp_call_function(cpuid_smp_cpuid, &cmd, 1, 1);
   }
+ preempt_enable();
 }
 #else /* ! CONFIG_SMP */
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Mar 31 2003 - 22:00:16 EST