add a bit of clarafication in a comment, and change the interrupt

handling code so that if a given interrupt is disabled (and therefore
can't have caused the actual I/O interrupt), its handler won't be
called even if its bit is set in the interrupt register.
This commit is contained in:
cgd 1996-05-02 21:56:46 +00:00
parent d84817d322
commit 7c1754fdff
1 changed files with 11 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: tc_3000_500.c,v 1.3 1995/12/20 00:43:30 cgd Exp $ */
/* $NetBSD: tc_3000_500.c,v 1.4 1996/05/02 21:56:46 cgd Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@ -93,7 +93,8 @@ tc_3000_500_intr_setup()
u_int32_t imr;
/*
* Disable all slot interrupts.
* Disable all slot interrupts. Note that this cannot
* actually disable CXTurbo, TCDS, and IOASIC interrupts.
*/
imr = *(volatile u_int32_t *)TC_3000_500_IMR_READ;
for (i = 0; i < TC_3000_500_NCOOKIES; i++)
@ -175,7 +176,7 @@ tc_3000_500_iointr(framep, vec)
void *framep;
int vec;
{
u_int32_t ir;
u_int32_t ir, imr, tmp;
int ifound;
#ifdef DIAGNOSTIC
@ -190,7 +191,13 @@ tc_3000_500_iointr(framep, vec)
do {
tc_syncbus();
ir = *(volatile u_int32_t *)TC_3000_500_IR_CLEAR;
ir = *(volatile u_int32_t *)TC_3000_500_IR;
imr = *(volatile u_int32_t *)TC_3000_500_IMR_READ;
tc_mb();
tmp = *(volatile u_int32_t *)TC_3000_500_IR_CLEAR;
/* Ignore interrupts that we haven't enabled. */
ir &= ~(imr & 0x1ff);
ifound = 0;
#define CHECKINTR(slot) \