patch-2.3.36 linux/arch/i386/kernel/irq.c

Next file: linux/arch/i386/kernel/pci-i386.c
Previous file: linux/arch/i386/defconfig
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.35/linux/arch/i386/kernel/irq.c linux/arch/i386/kernel/irq.c
@@ -731,6 +731,7 @@
 {
 	unsigned int i;
 	unsigned long delay;
+	unsigned long val;
 
 	/*
 	 * first, enable any unassigned irqs
@@ -754,6 +755,7 @@
 	/*
 	 * Now filter out any obviously spurious interrupts
 	 */
+	val = 0;
 	spin_lock_irq(&irq_controller_lock);
 	for (i=0; i<NR_IRQS; i++) {
 		unsigned int status = irq_desc[i].status;
@@ -766,24 +768,24 @@
 			irq_desc[i].status = status & ~IRQ_AUTODETECT;
 			irq_desc[i].handler->shutdown(i);
 		}
+
+		if (i < 32)
+			val |= 1 << i;
 	}
 	spin_unlock_irq(&irq_controller_lock);
 
-	return 0x12345678;
+	return val;
 }
 
 /*
  * Return a mask of triggered interrupts (this
  * can handle only legacy ISA interrupts).
  */
-unsigned int probe_irq_mask(unsigned long unused)
+unsigned int probe_irq_mask(unsigned long val)
 {
 	int i;
 	unsigned int mask;
 
-	if (unused != 0x12345678)
-		printk("Bad IRQ probe from %lx\n", (&unused)[-1]);
-
 	mask = 0;
 	spin_lock_irq(&irq_controller_lock);
 	for (i = 0; i < 16; i++) {
@@ -800,19 +802,16 @@
 	}
 	spin_unlock_irq(&irq_controller_lock);
 
-	return mask;
+	return mask & val;
 }
 
 /*
  * Return the one interrupt that triggered (this can
  * handle any interrupt source)
  */
-int probe_irq_off(unsigned long unused)
+int probe_irq_off(unsigned long val)
 {
 	int i, irq_found, nr_irqs;
-
-	if (unused != 0x12345678)
-		printk("Bad IRQ probe from %lx\n", (&unused)[-1]);
 
 	nr_irqs = 0;
 	irq_found = 0;

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