Account ISA interrupts by evcnt(9)
This commit is contained in:
parent
0f6618f084
commit
5c40f381f5
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: isa_machdep.h,v 1.12 2006/06/12 15:24:31 tsutsui Exp $ */
|
||||
/* $NetBSD: isa_machdep.h,v 1.13 2006/06/12 15:39:01 tsutsui Exp $ */
|
||||
/* $OpenBSD: isa_machdep.h,v 1.5 1997/04/19 17:20:00 pefo Exp $ */
|
||||
|
||||
/*
|
||||
@ -136,6 +136,8 @@ struct isa_intrhand {
|
||||
u_long ih_count;
|
||||
int ih_level;
|
||||
int ih_irq;
|
||||
struct evcnt ih_evcnt;
|
||||
char ih_evname[32];
|
||||
};
|
||||
|
||||
#endif /* _ISA_MACHDEP_H_ */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: isabus.c,v 1.32 2006/06/12 15:24:31 tsutsui Exp $ */
|
||||
/* $NetBSD: isabus.c,v 1.33 2006/06/12 15:39:01 tsutsui Exp $ */
|
||||
/* $OpenBSD: isabus.c,v 1.15 1998/03/16 09:38:46 pefo Exp $ */
|
||||
/* NetBSD: isa.c,v 1.33 1995/06/28 04:30:51 cgd Exp */
|
||||
|
||||
@ -120,7 +120,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: isabus.c,v 1.32 2006/06/12 15:24:31 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: isabus.c,v 1.33 2006/06/12 15:39:01 tsutsui Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/proc.h>
|
||||
@ -394,6 +394,9 @@ isabr_intr_establish(isa_chipset_tag_t ic, int irq, int type, int level,
|
||||
ih->ih_next = NULL;
|
||||
ih->ih_level = level;
|
||||
ih->ih_irq = irq;
|
||||
snprintf(ih->ih_evname, sizeof(ih->ih_evname), "irq %d", irq);
|
||||
evcnt_attach_dynamic(&ih->ih_evcnt, EVCNT_TYPE_INTR, NULL, "isa",
|
||||
ih->ih_evname);
|
||||
*p = ih;
|
||||
|
||||
return ih;
|
||||
@ -434,11 +437,13 @@ isabr_iointr(uint32_t mask, struct clockframe *cf)
|
||||
ih = isa_intrhand[isa_vector];
|
||||
if (isa_vector == 0 && ih) { /* Clock */ /*XXX*/
|
||||
last_cp0_count = mips3_cp0_count_read();
|
||||
(*ih->ih_fun)(cf);
|
||||
if ((*ih->ih_fun)(cf))
|
||||
ih->ih_evcnt.ev_count++;
|
||||
ih = ih->ih_next;
|
||||
}
|
||||
while (ih) {
|
||||
(*ih->ih_fun)(ih->ih_arg);
|
||||
if ((*ih->ih_fun)(ih->ih_arg))
|
||||
ih->ih_evcnt.ev_count++;
|
||||
ih = ih->ih_next;
|
||||
}
|
||||
imen = o_imen;
|
||||
|
Loading…
Reference in New Issue
Block a user