@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.154 2008/11/30 18:21:32 martin Exp $ */
+/* $NetBSD: machdep.c,v 1.155 2009/01/03 06:36:58 tsutsui Exp $ */
/*
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.154 2008/11/30 18:21:32 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.155 2009/01/03 06:36:58 tsutsui Exp $");
#include "opt_ddb.h"
#include "opt_compat_netbsd.h"
@@ -810,7 +810,20 @@
si->next = si_free;
si_free = si;
splx(s);
+
+ /*
+ * Raise spl for BASEPRI() checks to see
+ * nested interrupts in some drivers using callbacks
+ * since modern MI softint(9) doesn't seem to do it
+ * in !__HAVE_FAST_SOFTINTS case.
+ *
+ * XXX: This is just a workaround hack.
+ * Each driver should raise spl in its handler
+ * to avoid nested interrupts if necessary.
+ */
+ s = splsoftnet(); /* XXX */
function(rock1, rock2);
+ splx(s);
}
} while (si);
#ifdef DIAGNOSTIC