patch-2.1.112 linux/arch/i386/kernel/smp.c

Next file: linux/arch/i386/lib/Makefile
Previous file: linux/arch/i386/kernel/mtrr.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.111/linux/arch/i386/kernel/smp.c linux/arch/i386/kernel/smp.c
@@ -100,8 +100,15 @@
  */
 
 
+/* Kernel spinlock */
+spinlock_t kernel_flag = SPIN_LOCK_UNLOCKED;
+
 /*
  *	Why isn't this somewhere standard ??
+ *
+ * Maybe because this procedure is horribly buggy, and does
+ * not deserve to live.  Think about signedness issues for five
+ * seconds to see why.		- Linus
  */
 
 extern __inline int max(int a,int b)
@@ -135,8 +142,6 @@
 
 static volatile unsigned char smp_cpu_in_msg[NR_CPUS];	/* True if this processor is sending an IPI		*/
 
-volatile unsigned long kernel_flag=0;			/* Kernel spinlock 					*/
-volatile unsigned char active_kernel_processor = NO_PROC_ID;	/* Processor holding kernel spinlock		*/
 volatile unsigned long kernel_counter=0;		/* Number of times the processor holds the lock		*/
 volatile unsigned long syscall_count=0;			/* Number of times the processor holds the syscall lock	*/
 
@@ -990,7 +995,6 @@
 
 	cpu_present_map |= (1 << hard_smp_processor_id());
 	cpu_number_map[boot_cpu_id] = 0;
-	active_kernel_processor=boot_cpu_id;
 
 	/*
 	 *	If we don't conform to the Intel MPS standard, get out
@@ -1364,12 +1368,6 @@
 {
 	unsigned long flags;
 
-#if 0
-	if(smp_activated && smp_processor_id()!=active_kernel_processor) {
-		printk("CPU #%d:Attempted flush tlb IPI when not AKP(=%d)\n",smp_processor_id(),active_kernel_processor);
-		*(char *)0=0;
-	}
-#endif
 /*	printk("SMI-");*/
 
 	/*
@@ -1412,7 +1410,7 @@
 
 	__save_flags(flags);
 	__cli();
-	smp_message_pass(cpu, MSG_RESCHEDULE, 0L, 2);
+	smp_message_pass(cpu, MSG_RESCHEDULE, 0L, 0);
 	__restore_flags(flags);
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov