Sun Jan 4 15:34:18 2009 UTC ()
Account ci->ci_idepth on calling handlers in ext_intr() as well as
powerpc/pic/intr.c:pic_handle_intr().  Closes PR port-evbppc/40288.

Should be pulled up to netbsd-5.


(tsutsui)
diff -r1.20 -r1.21 src/sys/arch/powerpc/ibm4xx/intr.c

cvs diff -r1.20 -r1.21 src/sys/arch/powerpc/ibm4xx/Attic/intr.c (expand / switch to context diff)
--- src/sys/arch/powerpc/ibm4xx/Attic/intr.c 2008/01/02 11:48:27 1.20
+++ src/sys/arch/powerpc/ibm4xx/Attic/intr.c 2009/01/04 15:34:18 1.21
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.20 2008/01/02 11:48:27 ad Exp $	*/
+/*	$NetBSD: intr.c,v 1.21 2009/01/04 15:34:18 tsutsui Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.20 2008/01/02 11:48:27 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.21 2009/01/04 15:34:18 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/malloc.h>
@@ -251,6 +251,7 @@
 			ci->ci_ipending |= r_imen;
 			disable_irq(i);
  		} else {
+			ci->ci_idepth++;
 			splraise(intrs[i].is_mask);
 			if (intrs[i].is_type == IST_LEVEL)
 				disable_irq(i);
@@ -272,6 +273,7 @@
 			ci->ci_cpl = pcpl;
 			uvmexp.intrs++;
 			intrs[i].is_evcnt.ev_count++;
+			ci->ci_idepth--;
 		}
 	}
 	mtdcr(INTR_ACK, bits_to_clear);	/* Acknowledge all pending interrupts */