Blocking soft interrupts can be useful..

This commit is contained in:
soren 2000-03-21 02:27:50 +00:00
parent 82f0c9bf4a
commit 28fba2d433
3 changed files with 18 additions and 8 deletions

View File

@ -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 @@ cobalt_hardware_intr(mask, pc, status, cause)
static u_int32_t cycles;
int s;
cf.pc = pc;
cf.sr = status;
/* XXX Reverse hardlock and statclock? */
@ -139,6 +137,9 @@ cobalt_hardware_intr(mask, pc, status, cause)
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 @@ cobalt_hardware_intr(mask, pc, status, cause)
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 */

View File

@ -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 @@ extern void _clrsoftintr(int);
#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

View File

@ -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 @@ pci_intr_establish(pc, ih, level, func, arg)
* 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);
}