patch-2.4.3 linux/arch/ppc/kernel/irq.c

Next file: linux/arch/ppc/kernel/m8260_setup.c
Previous file: linux/arch/ppc/kernel/head_8xx.S
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.2/linux/arch/ppc/kernel/irq.c linux/arch/ppc/kernel/irq.c
@@ -7,8 +7,8 @@
  *    Copyright (C) 1992 Linus Torvalds
  *  Adapted from arch/i386 by Gary Thomas
  *    Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
- *  Updated and modified by Cort Dougan (cort@cs.nmt.edu)
- *    Copyright (C) 1996 Cort Dougan
+ *  Updated and modified by Cort Dougan <cort@fsmlabs.com>
+ *    Copyright (C) 1996-2001 Cort Dougan
  *  Adapted for Power Macintosh by Paul Mackerras
  *    Copyright (C) 1996 Paul Mackerras (paulus@cs.anu.edu.au)
  *  Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
@@ -258,7 +258,10 @@
 	
 	retval = setup_irq(irq, action);
 	if (retval)
+	{
 		kfree(action);
+		return retval;
+	}
 		
 	return 0;
 }
@@ -464,13 +467,11 @@
 			ppc_spurious_interrupts++;
 			printk(KERN_DEBUG "Unhandled interrupt %x, disabled\n", irq);
 			/* We can't call disable_irq here, it would deadlock */
-			if (!desc->depth)
-				desc->depth = 1;
+			++desc->depth;
 			desc->status |= IRQ_DISABLED;
-			/* This is not a real spurrious interrupt, we
-			 * have to eoi it, so we jump to out
-			 */
 			mask_irq(irq);
+			/* This is a real interrupt, we have to eoi it,
+			   so we jump to out */
 			goto out;
 		}
 		status &= ~IRQ_PENDING; /* we commit to handling */

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