patch-2.3.43 linux/arch/alpha/kernel/irq.c

Next file: linux/arch/alpha/kernel/machvec_impl.h
Previous file: linux/arch/alpha/kernel/entry.S
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.42/linux/arch/alpha/kernel/irq.c linux/arch/alpha/kernel/irq.c
@@ -377,10 +377,6 @@
 /* Global IRQ locking depth. */
 atomic_t global_irq_count = ATOMIC_INIT(0);
 
-/* This protects BH software state (masks, things like that). */
-atomic_t global_bh_lock = ATOMIC_INIT(0);
-atomic_t global_bh_count = ATOMIC_INIT(0);
-
 static void *previous_irqholder = NULL;
 
 #define MAXCOUNT 100000000
@@ -401,7 +397,7 @@
 		 */
 		if (!atomic_read(&global_irq_count)) {
 			if (local_bh_count(cpu)
-			    || !atomic_read(&global_bh_count))
+			    || !spin_is_locked(&global_bh_lock))
 				break;
 		}
 
@@ -422,7 +418,7 @@
 			if (spin_is_locked(&global_irq_lock))
 				continue;
 			if (!local_bh_count(cpu)
-			    && atomic_read(&global_bh_count))
+			    && spin_is_locked(&global_bh_lock))
 				continue;
 			if (spin_trylock(&global_irq_lock))
 				break;
@@ -552,7 +548,7 @@
 	       cpu_data[1].irq_count);
 
         printk("bh:   %d [%d %d]\n",
-	       atomic_read(&global_bh_count),
+	       spin_is_locked(&global_bh_lock) ? 1 : 0,
 	       cpu_data[0].bh_count,
 	       cpu_data[1].bh_count);
 #if 0
@@ -567,35 +563,6 @@
 #endif
 }
         
-static inline void
-wait_on_bh(void)
-{
-	int count = MAXCOUNT;
-        do {
-		if (!--count) {
-			show("wait_on_bh", 0);
-                        count = ~0;
-                }
-                /* nothing .. wait for the other bh's to go away */
-		barrier();
-        } while (atomic_read(&global_bh_count) != 0);
-}
-
-/*
- * This is called when we want to synchronize with
- * bottom half handlers. We need to wait until
- * no other CPU is executing any bottom half handler.
- *
- * Don't wait if we're already running in an interrupt
- * context or are inside a bh handler.
- */
-void
-synchronize_bh(void)
-{
-	if (atomic_read(&global_bh_count) && !in_interrupt())
-		wait_on_bh();
-}
-
 /*
  * From its use, I infer that synchronize_irq() stalls a thread until
  * the effects of a command to an external device are known to have
@@ -897,6 +864,7 @@
 	case 0x98: reason = "processor detected hard error"; break;
 	
 	/* System specific (these are for Alcor, at least): */
+	case 0x202: reason = "system detected hard error"; break;
 	case 0x203: reason = "system detected uncorrectable ECC error"; break;
 	case 0x204: reason = "SIO SERR occurred on PCI bus"; break;
 	case 0x205: reason = "parity error detected by CIA"; break;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)