Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/cobalt Blocking soft interrupts can be useful..
details: https://anonhg.NetBSD.org/src/rev/577cfb7be44a
branches: trunk
changeset: 483927:577cfb7be44a
user: soren <soren%NetBSD.org@localhost>
date: Tue Mar 21 02:27:50 2000 +0000
description:
Blocking soft interrupts can be useful..
diffstat:
sys/arch/cobalt/cobalt/machdep.c | 11 ++++++++---
sys/arch/cobalt/include/intr.h | 5 +++--
sys/arch/cobalt/pci/pci_machdep.c | 10 +++++++---
3 files changed, 18 insertions(+), 8 deletions(-)
diffs (84 lines):
diff -r 017c12d26ebb -r 577cfb7be44a sys/arch/cobalt/cobalt/machdep.c
--- a/sys/arch/cobalt/cobalt/machdep.c Tue Mar 21 02:26:48 2000 +0000
+++ b/sys/arch/cobalt/cobalt/machdep.c Tue Mar 21 02:27:50 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.2 2000/03/21 01:05:54 soren Exp $ */
+/* $NetBSD: machdep.c,v 1.3 2000/03/21 02:27:50 soren Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang. All rights reserved.
@@ -129,8 +129,6 @@
static u_int32_t cycles;
int s;
- cf.pc = pc;
- cf.sr = status;
/* XXX Reverse hardlock and statclock? */
@@ -139,6 +137,9 @@
cycles = mips3_cycle_count();
mips3_write_compare(cycles + TICK_CYCLES);
+ cf.pc = pc;
+ cf.sr = status;
+
s = splstatclock(); /* XXX redo interrupts XXX */
statclock(&cf);
splx(s); /* XXX redo interrupts XXX */
@@ -178,6 +179,10 @@
if (*irq_src & 0x00000100) {
*irq_src = 0;
+
+ cf.pc = pc;
+ cf.sr = status;
+
s = splclock(); /* XXX redo interrupts XXX */
hardclock(&cf);
splx(s); /* XXX redo interrupts XXX */
diff -r 017c12d26ebb -r 577cfb7be44a sys/arch/cobalt/include/intr.h
--- a/sys/arch/cobalt/include/intr.h Tue Mar 21 02:26:48 2000 +0000
+++ b/sys/arch/cobalt/include/intr.h Tue Mar 21 02:27:50 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intr.h,v 1.1 2000/03/19 23:07:46 soren Exp $ */
+/* $NetBSD: intr.h,v 1.2 2000/03/21 02:27:50 soren Exp $ */
#include <mips/cpuregs.h>
@@ -44,7 +44,8 @@
#define splhigh() _splraise(MIPS_INT_MASK)
#define spl0() (void)_spllower(0)
#define splx(s) (void)_splset(s)
-#define SPLBIO MIPS_INT_MASK_4
+#define SPLSOFT MIPS_SOFT_INT_MASK_0 | MIPS_SOFT_INT_MASK_1
+#define SPLBIO SPLSOFT | MIPS_INT_MASK_4
#define SPLNET SPLBIO | MIPS_INT_MASK_1 | MIPS_INT_MASK_2
#define SPLTTY SPLNET | MIPS_INT_MASK_3
#define SPLCLOCK SPLTTY | MIPS_INT_MASK_0 | MIPS_INT_MASK_5
diff -r 017c12d26ebb -r 577cfb7be44a sys/arch/cobalt/pci/pci_machdep.c
--- a/sys/arch/cobalt/pci/pci_machdep.c Tue Mar 21 02:26:48 2000 +0000
+++ b/sys/arch/cobalt/pci/pci_machdep.c Tue Mar 21 02:27:50 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.c,v 1.2 2000/03/21 01:05:53 soren Exp $ */
+/* $NetBSD: pci_machdep.c,v 1.3 2000/03/21 02:27:50 soren Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang. All rights reserved.
@@ -175,10 +175,14 @@
* XXX XXX XXX
*/
- if (ih == 4)
+ if (ih == 4) {
tlp0 = arg;
- if (ih == 13)
+ return (void *)-1;
+ }
+ if (ih == 13) {
tlp1 = arg;
+ return (void *)-1;
+ }
return intr_establish(NULL, ih, IST_LEVEL, level, func, arg);
}
Home |
Main Index |
Thread Index |
Old Index