Module Name: src
Committed By: mrg
Date: Sun Jan 3 23:03:21 UTC 2010
Modified Files:
src/sys/arch/sparc/dev: sbus.c vme_machdep.c
src/sys/arch/sparc/include: cpu.h
src/sys/arch/sparc/sparc: intr.c machdep.c msiiep.c oclock.c timer.c
timer_msiiep.c
Log Message:
add an explicit "bool mpsafe" to intr_establish(). only set it to true
for the sun4m timer/counter interrupts. this gets lev10/14 working again
on SMP systems, where those interrupts started taking the kernel lock and
hanging...
To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/sparc/dev/sbus.c
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/sparc/dev/vme_machdep.c
cvs rdiff -u -r1.88 -r1.89 src/sys/arch/sparc/include/cpu.h
cvs rdiff -u -r1.106 -r1.107 src/sys/arch/sparc/sparc/intr.c
cvs rdiff -u -r1.299 -r1.300 src/sys/arch/sparc/sparc/machdep.c
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/sparc/sparc/msiiep.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sparc/sparc/oclock.c
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/sparc/sparc/timer.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/sparc/sparc/timer_msiiep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/sparc/dev/sbus.c
diff -u src/sys/arch/sparc/dev/sbus.c:1.73 src/sys/arch/sparc/dev/sbus.c:1.74
--- src/sys/arch/sparc/dev/sbus.c:1.73 Thu Sep 17 16:28:12 2009
+++ src/sys/arch/sparc/dev/sbus.c Sun Jan 3 23:03:20 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: sbus.c,v 1.73 2009/09/17 16:28:12 tsutsui Exp $ */
+/* $NetBSD: sbus.c,v 1.74 2010/01/03 23:03:20 mrg Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sbus.c,v 1.73 2009/09/17 16:28:12 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sbus.c,v 1.74 2010/01/03 23:03:20 mrg Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
@@ -590,7 +590,7 @@
ih->ih_fun = handler;
ih->ih_arg = arg;
- intr_establish(pil, level, ih, fastvec);
+ intr_establish(pil, level, ih, fastvec, false);
return (ih);
}
Index: src/sys/arch/sparc/dev/vme_machdep.c
diff -u src/sys/arch/sparc/dev/vme_machdep.c:1.61 src/sys/arch/sparc/dev/vme_machdep.c:1.62
--- src/sys/arch/sparc/dev/vme_machdep.c:1.61 Sat Nov 21 04:16:51 2009
+++ src/sys/arch/sparc/dev/vme_machdep.c Sun Jan 3 23:03:20 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: vme_machdep.c,v 1.61 2009/11/21 04:16:51 rmind Exp $ */
+/* $NetBSD: vme_machdep.c,v 1.62 2010/01/03 23:03:20 mrg Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vme_machdep.c,v 1.61 2009/11/21 04:16:51 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vme_machdep.c,v 1.62 2010/01/03 23:03:20 mrg Exp $");
#include <sys/param.h>
#include <sys/extent.h>
@@ -770,7 +770,7 @@
panic("vme_addirq");
ih->ih_fun = sc->sc_vmeintr;
ih->ih_arg = vih;
- intr_establish(pil, 0, ih, NULL);
+ intr_establish(pil, 0, ih, NULL, false);
} else {
svih->next = (vme_intr_handle_t)ih->ih_arg;
ih->ih_arg = vih;
Index: src/sys/arch/sparc/include/cpu.h
diff -u src/sys/arch/sparc/include/cpu.h:1.88 src/sys/arch/sparc/include/cpu.h:1.89
--- src/sys/arch/sparc/include/cpu.h:1.88 Sun Jan 3 12:39:22 2010
+++ src/sys/arch/sparc/include/cpu.h Sun Jan 3 23:03:21 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.88 2010/01/03 12:39:22 mrg Exp $ */
+/* $NetBSD: cpu.h,v 1.89 2010/01/03 23:03:21 mrg Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -169,7 +169,7 @@
void *ih_realarg;
} *intrhand[15];
-void intr_establish(int, int, struct intrhand *, void (*)(void));
+void intr_establish(int, int, struct intrhand *, void (*)(void), bool);
void intr_disestablish(int, struct intrhand *);
void intr_lock_kernel(void);
Index: src/sys/arch/sparc/sparc/intr.c
diff -u src/sys/arch/sparc/sparc/intr.c:1.106 src/sys/arch/sparc/sparc/intr.c:1.107
--- src/sys/arch/sparc/sparc/intr.c:1.106 Sun Jan 3 12:39:22 2010
+++ src/sys/arch/sparc/sparc/intr.c Sun Jan 3 23:03:21 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: intr.c,v 1.106 2010/01/03 12:39:22 mrg Exp $ */
+/* $NetBSD: intr.c,v 1.107 2010/01/03 23:03:21 mrg Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.106 2010/01/03 12:39:22 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.107 2010/01/03 23:03:21 mrg Exp $");
#include "opt_multiprocessor.h"
#include "opt_sparc_arch.h"
@@ -635,11 +635,12 @@
*/
void
intr_establish(int level, int classipl,
- struct intrhand *ih, void (*vec)(void))
+ struct intrhand *ih, void (*vec)(void),
+ bool maybe_mpsafe)
{
int s = splhigh();
#ifdef MULTIPROCESSOR
- bool mpsafe = (level != IPL_VM);
+ bool mpsafe = (level != IPL_VM) || maybe_mpsafe;
#endif /* MULTIPROCESSOR */
#ifdef DIAGNOSTIC
Index: src/sys/arch/sparc/sparc/machdep.c
diff -u src/sys/arch/sparc/sparc/machdep.c:1.299 src/sys/arch/sparc/sparc/machdep.c:1.300
--- src/sys/arch/sparc/sparc/machdep.c:1.299 Thu Dec 10 14:13:52 2009
+++ src/sys/arch/sparc/sparc/machdep.c Sun Jan 3 23:03:21 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.299 2009/12/10 14:13:52 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.300 2010/01/03 23:03:21 mrg Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.299 2009/12/10 14:13:52 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.300 2010/01/03 23:03:21 mrg Exp $");
#include "opt_compat_netbsd.h"
#include "opt_compat_sunos.h"
@@ -2101,7 +2101,7 @@
ih->ih_fun = handler;
ih->ih_arg = arg;
- intr_establish(pil, level, ih, fastvec);
+ intr_establish(pil, level, ih, fastvec, false);
return (ih);
}
Index: src/sys/arch/sparc/sparc/msiiep.c
diff -u src/sys/arch/sparc/sparc/msiiep.c:1.38 src/sys/arch/sparc/sparc/msiiep.c:1.39
--- src/sys/arch/sparc/sparc/msiiep.c:1.38 Wed Nov 11 14:20:01 2009
+++ src/sys/arch/sparc/sparc/msiiep.c Sun Jan 3 23:03:21 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: msiiep.c,v 1.38 2009/11/11 14:20:01 he Exp $ */
+/* $NetBSD: msiiep.c,v 1.39 2010/01/03 23:03:21 mrg Exp $ */
/*
* Copyright (c) 2001 Valeriy E. Ushakov
@@ -27,7 +27,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msiiep.c,v 1.38 2009/11/11 14:20:01 he Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msiiep.c,v 1.39 2010/01/03 23:03:21 mrg Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
@@ -563,7 +563,7 @@
ih->ih_fun = handler;
ih->ih_arg = arg;
- intr_establish(pil, ipl, ih, fastvec);
+ intr_establish(pil, ipl, ih, fastvec, false);
return(ih);
}
Index: src/sys/arch/sparc/sparc/oclock.c
diff -u src/sys/arch/sparc/sparc/oclock.c:1.18 src/sys/arch/sparc/sparc/oclock.c:1.19
--- src/sys/arch/sparc/sparc/oclock.c:1.18 Mon Apr 28 20:23:36 2008
+++ src/sys/arch/sparc/sparc/oclock.c Sun Jan 3 23:03:21 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: oclock.c,v 1.18 2008/04/28 20:23:36 martin Exp $ */
+/* $NetBSD: oclock.c,v 1.19 2010/01/03 23:03:21 mrg Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: oclock.c,v 1.18 2008/04/28 20:23:36 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: oclock.c,v 1.19 2010/01/03 23:03:21 mrg Exp $");
#include "opt_sparc_arch.h"
@@ -180,7 +180,7 @@
timer_init = oclock_init;
/* link interrupt handler */
- intr_establish(10, 0, &level10, NULL);
+ intr_establish(10, 0, &level10, NULL, false);
/* Our TOD clock year 0 represents 1968 */
sc->sc_year0 = 1968;
Index: src/sys/arch/sparc/sparc/timer.c
diff -u src/sys/arch/sparc/sparc/timer.c:1.24 src/sys/arch/sparc/sparc/timer.c:1.25
--- src/sys/arch/sparc/sparc/timer.c:1.24 Wed Mar 18 10:22:36 2009
+++ src/sys/arch/sparc/sparc/timer.c Sun Jan 3 23:03:21 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: timer.c,v 1.24 2009/03/18 10:22:36 cegger Exp $ */
+/* $NetBSD: timer.c,v 1.25 2010/01/03 23:03:21 mrg Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: timer.c,v 1.24 2009/03/18 10:22:36 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: timer.c,v 1.25 2010/01/03 23:03:21 mrg Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -211,8 +211,8 @@
}
#endif
/* link interrupt handlers */
- intr_establish(10, 0, &level10, NULL);
- intr_establish(14, 0, &level14, NULL);
+ intr_establish(10, 0, &level10, NULL, true);
+ intr_establish(14, 0, &level14, NULL, true);
/* Establish a soft interrupt at a lower level for schedclock */
sched_cookie = sparc_softintr_establish(IPL_SCHED, schedintr, NULL);
Index: src/sys/arch/sparc/sparc/timer_msiiep.c
diff -u src/sys/arch/sparc/sparc/timer_msiiep.c:1.23 src/sys/arch/sparc/sparc/timer_msiiep.c:1.24
--- src/sys/arch/sparc/sparc/timer_msiiep.c:1.23 Mon Dec 3 15:34:22 2007
+++ src/sys/arch/sparc/sparc/timer_msiiep.c Sun Jan 3 23:03:21 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: timer_msiiep.c,v 1.23 2007/12/03 15:34:22 ad Exp $ */
+/* $NetBSD: timer_msiiep.c,v 1.24 2010/01/03 23:03:21 mrg Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: timer_msiiep.c,v 1.23 2007/12/03 15:34:22 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: timer_msiiep.c,v 1.24 2010/01/03 23:03:21 mrg Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -175,8 +175,8 @@
mspcic_write_1(pcic_cipar, 0xae);
/* link interrupt handlers */
- intr_establish(10, 0, &level10, NULL);
- intr_establish(14, 0, &level14, NULL);
+ intr_establish(10, 0, &level10, NULL, false);
+ intr_establish(14, 0, &level14, NULL, false);
/* Establish a soft interrupt at a lower level for schedclock */
sched_cookie = sparc_softintr_establish(IPL_SCHED, schedintr, NULL);