In softintr_dispatch(), clear ssir bit before calling softintr handlers
with a single_inst op, otherwise sometimes softintr might be lost.
This commit is contained in:
parent
1fe335b800
commit
aa0eea7974
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: softintr.c,v 1.2 2002/03/15 05:52:54 gmcgarry Exp $ */
|
/* $NetBSD: softintr.c,v 1.3 2003/07/19 16:06:27 tsutsui Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: softintr.c,v 1.2 2002/03/15 05:52:54 gmcgarry Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: softintr.c,v 1.3 2003/07/19 16:06:27 tsutsui Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
|
@ -53,6 +53,8 @@ __KERNEL_RCSID(0, "$NetBSD: softintr.c,v 1.2 2002/03/15 05:52:54 gmcgarry Exp $"
|
||||||
|
|
||||||
#include <uvm/uvm_extern.h>
|
#include <uvm/uvm_extern.h>
|
||||||
|
|
||||||
|
#include <m68k/asm_single.h>
|
||||||
|
|
||||||
#include <machine/cpu.h>
|
#include <machine/cpu.h>
|
||||||
#include <machine/intr.h>
|
#include <machine/intr.h>
|
||||||
|
|
||||||
|
@ -102,8 +104,8 @@ softintr_dispatch()
|
||||||
u_int8_t mask;
|
u_int8_t mask;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
mask = 0x1;
|
mask = 0x01;
|
||||||
for (mask = 1, hsi = hp300_soft_intrs, handled = 0;
|
for (hsi = hp300_soft_intrs, handled = 0;
|
||||||
hsi < &hp300_soft_intrs[IPL_NSOFT];
|
hsi < &hp300_soft_intrs[IPL_NSOFT];
|
||||||
hsi++, mask <<= 1) {
|
hsi++, mask <<= 1) {
|
||||||
|
|
||||||
|
@ -112,6 +114,7 @@ softintr_dispatch()
|
||||||
|
|
||||||
hsi->hsi_evcnt.ev_count++;
|
hsi->hsi_evcnt.ev_count++;
|
||||||
handled++;
|
handled++;
|
||||||
|
single_inst_bclr_b(ssir, mask);
|
||||||
|
|
||||||
for (sih = LIST_FIRST(&hsi->hsi_q);
|
for (sih = LIST_FIRST(&hsi->hsi_q);
|
||||||
sih != NULL;
|
sih != NULL;
|
||||||
|
@ -122,8 +125,6 @@ softintr_dispatch()
|
||||||
(*sih->sih_fn)(sih->sih_arg);
|
(*sih->sih_fn)(sih->sih_arg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ssir &= ~mask;
|
|
||||||
}
|
}
|
||||||
} while (handled);
|
} while (handled);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue