Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/bebox Sync w/ the i386 port. Fixes some bugs in th...
details: https://anonhg.NetBSD.org/src/rev/8da24297e294
branches: trunk
changeset: 475099:8da24297e294
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sun Aug 01 07:52:22 1999 +0000
description:
Sync w/ the i386 port. Fixes some bugs in the conventional interrupt
heirarchy. Reviewed by sakamoto%netbsd.org@localhost.
diffstat:
sys/arch/bebox/bebox/extintr.c | 30 ++++++++++++++++++++++++------
sys/arch/bebox/include/intr.h | 19 ++++++++++---------
2 files changed, 34 insertions(+), 15 deletions(-)
diffs (126 lines):
diff -r 5c6e4156c81a -r 8da24297e294 sys/arch/bebox/bebox/extintr.c
--- a/sys/arch/bebox/bebox/extintr.c Sun Aug 01 06:45:28 1999 +0000
+++ b/sys/arch/bebox/bebox/extintr.c Sun Aug 01 07:52:22 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: extintr.c,v 1.9 1998/08/24 01:40:27 sakamoto Exp $ */
+/* $NetBSD: extintr.c,v 1.10 1999/08/01 07:52:22 thorpej Exp $ */
/* $OpenBSD: isabus.c,v 1.1 1997/10/11 11:53:00 pefo Exp $ */
/*-
@@ -316,6 +316,13 @@
}
/*
+ * Initialize the soft interrupt masks to block themselves.
+ */
+ imask[IPL_SOFTCLOCK] = SINT_SERIAL;
+ imask[IPL_SOFTNET] = SINT_NET;
+ imask[IPL_SOFTSERIAL] = SINT_SERIAL;
+
+ /*
* IPL_NONE is used for hardware interrupts that are never blocked,
* and do not block anything else.
*/
@@ -325,34 +332,45 @@
* Enforce a hierarchy that gives slow devices a better chance at not
* dropping data.
*/
- imask[IPL_TTY] |= imask[IPL_NET] | imask[IPL_BIO];
+ imask[IPL_SOFTCLOCK] |= imask[IPL_NONE];
+ imask[IPL_SOFTNET] |= imask[IPL_SOFTCLOCK];
+ imask[IPL_BIO] |= imask[IPL_SOFTNET];
imask[IPL_NET] |= imask[IPL_BIO];
+ imask[IPL_SOFTSERIAL] |= imask[IPL_NET];
+ imask[IPL_TTY] |= imask[IPL_SOFTSERIAL];
/*
* There are tty, network and disk drivers that use free() at interrupt
* time, so imp > (tty | net | bio).
*/
- imask[IPL_IMP] |= imask[IPL_TTY] | imask[IPL_NET] | imask[IPL_BIO];
+ imask[IPL_IMP] |= imask[IPL_TTY];
+
imask[IPL_AUDIO] |= imask[IPL_IMP];
/*
* Since run queues may be manipulated by both the statclock and tty,
* network, and disk drivers, clock > imp.
*/
+ imask[IPL_CLOCK] |= SPL_CLOCK; /* block the clock */
imask[IPL_CLOCK] |= imask[IPL_AUDIO];
- imask[IPL_SERIAL] |= imask[IPL_CLOCK];
/*
* IPL_HIGH must block everything that can manipulate a run queue.
*/
- imask[IPL_HIGH] = 0xffffffff;
+ imask[IPL_HIGH] |= imask[IPL_CLOCK];
+
+ /*
+ * We need serial drivers to run at the absolute highest priority to
+ * avoid overruns, so serial > high.
+ */
+ imask[IPL_SERIAL] |= imask[IPL_HIGH];
/* And eventually calculate the complete masks. */
for (irq = 0; irq < ICU_LEN; irq++) {
register int irqs = 1 << irq;
for (q = intrhand[irq]; q; q = q->ih_next)
irqs |= imask[q->ih_level];
- intrmask[irq] = irqs | SINT_MASK;
+ intrmask[irq] = irqs;
}
{
diff -r 5c6e4156c81a -r 8da24297e294 sys/arch/bebox/include/intr.h
--- a/sys/arch/bebox/include/intr.h Sun Aug 01 06:45:28 1999 +0000
+++ b/sys/arch/bebox/include/intr.h Sun Aug 01 07:52:22 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intr.h,v 1.7 1999/06/24 01:33:08 sakamoto Exp $ */
+/* $NetBSD: intr.h,v 1.8 1999/08/01 07:52:23 thorpej Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -45,11 +45,12 @@
#define IPL_SOFTNET 7 /* software network interrupt */
#define IPL_BIO 6 /* block I/O */
#define IPL_NET 5 /* network */
-#define IPL_TTY 4 /* terminal */
+#define IPL_SOFTSERIAL 4 /* software serial interrupt */
+#define IPL_TTY 3 /* terminal */
#define IPL_IMP 3 /* memory allocation */
#define IPL_AUDIO 2 /* audio */
#define IPL_CLOCK 1 /* clock */
-#define IPL_HIGH 0 /* everything */
+#define IPL_HIGH 1 /* everything */
#define IPL_SERIAL 0 /* serial */
#define NIPL 10
@@ -173,13 +174,13 @@
#define splbio() splraise(imask[IPL_BIO])
#define splnet() splraise(imask[IPL_NET])
#define spltty() splraise(imask[IPL_TTY])
-#define splclock() splraise(SPL_CLOCK|SINT_CLOCK|SINT_NET)
+#define splclock() splraise(imask[IPL_CLOCK])
#define splimp() splraise(imask[IPL_IMP])
#define splserial() splraise(imask[IPL_SERIAL])
-#define splstatclock() splhigh()
-#define splsoftclock() spllower(SINT_CLOCK)
-#define splsoftnet() splraise(SINT_NET)
-#define splsoftserial() splraise(SINT_SERIAL)
+#define splstatclock() splclock()
+#define splsoftclock() spllower(imask[IPL_SOFTCLOCK])
+#define splsoftnet() splraise(imask[IPL_SOFTNET])
+#define splsoftserial() splraise(imask[IPL_SOFTSERIAL])
#define spllpt() spltty()
@@ -187,7 +188,7 @@
#define setsoftnet() set_sint(SINT_NET);
#define setsoftserial() set_sint(SINT_SERIAL);
-#define splhigh() splraise(0xffffffff)
+#define splhigh() splraise(imask[IPL_HIGH])
#define spl0() spllower(0)
#endif /* !_LOCORE */
Home |
Main Index |
Thread Index |
Old Index