Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc add an explicit "bool mpsafe" to intr_establi...
details: https://anonhg.NetBSD.org/src/rev/cef8af024128
branches: trunk
changeset: 750515:cef8af024128
user: mrg <mrg%NetBSD.org@localhost>
date: Sun Jan 03 23:03:20 2010 +0000
description:
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...
diffstat:
sys/arch/sparc/dev/sbus.c | 6 +++---
sys/arch/sparc/dev/vme_machdep.c | 6 +++---
sys/arch/sparc/include/cpu.h | 4 ++--
sys/arch/sparc/sparc/intr.c | 9 +++++----
sys/arch/sparc/sparc/machdep.c | 6 +++---
sys/arch/sparc/sparc/msiiep.c | 6 +++---
sys/arch/sparc/sparc/oclock.c | 6 +++---
sys/arch/sparc/sparc/timer.c | 8 ++++----
sys/arch/sparc/sparc/timer_msiiep.c | 8 ++++----
9 files changed, 30 insertions(+), 29 deletions(-)
diffs (244 lines):
diff -r 6084bb01ba12 -r cef8af024128 sys/arch/sparc/dev/sbus.c
--- a/sys/arch/sparc/dev/sbus.c Sun Jan 03 22:55:25 2010 +0000
+++ b/sys/arch/sparc/dev/sbus.c Sun Jan 03 23:03:20 2010 +0000
@@ -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);
}
diff -r 6084bb01ba12 -r cef8af024128 sys/arch/sparc/dev/vme_machdep.c
--- a/sys/arch/sparc/dev/vme_machdep.c Sun Jan 03 22:55:25 2010 +0000
+++ b/sys/arch/sparc/dev/vme_machdep.c Sun Jan 03 23:03:20 2010 +0000
@@ -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;
diff -r 6084bb01ba12 -r cef8af024128 sys/arch/sparc/include/cpu.h
--- a/sys/arch/sparc/include/cpu.h Sun Jan 03 22:55:25 2010 +0000
+++ b/sys/arch/sparc/include/cpu.h Sun Jan 03 23:03:20 2010 +0000
@@ -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);
diff -r 6084bb01ba12 -r cef8af024128 sys/arch/sparc/sparc/intr.c
--- a/sys/arch/sparc/sparc/intr.c Sun Jan 03 22:55:25 2010 +0000
+++ b/sys/arch/sparc/sparc/intr.c Sun Jan 03 23:03:20 2010 +0000
@@ -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
diff -r 6084bb01ba12 -r cef8af024128 sys/arch/sparc/sparc/machdep.c
--- a/sys/arch/sparc/sparc/machdep.c Sun Jan 03 22:55:25 2010 +0000
+++ b/sys/arch/sparc/sparc/machdep.c Sun Jan 03 23:03:20 2010 +0000
@@ -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);
}
diff -r 6084bb01ba12 -r cef8af024128 sys/arch/sparc/sparc/msiiep.c
--- a/sys/arch/sparc/sparc/msiiep.c Sun Jan 03 22:55:25 2010 +0000
+++ b/sys/arch/sparc/sparc/msiiep.c Sun Jan 03 23:03:20 2010 +0000
@@ -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);
}
diff -r 6084bb01ba12 -r cef8af024128 sys/arch/sparc/sparc/oclock.c
--- a/sys/arch/sparc/sparc/oclock.c Sun Jan 03 22:55:25 2010 +0000
+++ b/sys/arch/sparc/sparc/oclock.c Sun Jan 03 23:03:20 2010 +0000
@@ -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;
diff -r 6084bb01ba12 -r cef8af024128 sys/arch/sparc/sparc/timer.c
--- a/sys/arch/sparc/sparc/timer.c Sun Jan 03 22:55:25 2010 +0000
+++ b/sys/arch/sparc/sparc/timer.c Sun Jan 03 23:03:20 2010 +0000
@@ -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);
diff -r 6084bb01ba12 -r cef8af024128 sys/arch/sparc/sparc/timer_msiiep.c
--- a/sys/arch/sparc/sparc/timer_msiiep.c Sun Jan 03 22:55:25 2010 +0000
+++ b/sys/arch/sparc/sparc/timer_msiiep.c Sun Jan 03 23:03:20 2010 +0000
@@ -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);
Home |
Main Index |
Thread Index |
Old Index