Count jazzio timer interrupts by evcnt(9).

This commit is contained in:
tsutsui 2005-08-20 17:58:49 +00:00
parent 82bdaacb4f
commit 54713c08ec
4 changed files with 13 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: c_magnum.c,v 1.9 2005/01/22 08:43:02 tsutsui Exp $ */
/* $NetBSD: c_magnum.c,v 1.10 2005/08/20 17:58:49 tsutsui Exp $ */
/* $OpenBSD: machdep.c,v 1.36 1999/05/22 21:22:19 weingart Exp $ */
/*
@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: c_magnum.c,v 1.9 2005/01/22 08:43:02 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: c_magnum.c,v 1.10 2005/08/20 17:58:49 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -169,6 +169,7 @@ timer_magnum_intr(uint32_t mask, struct clockframe *cf)
temp = inw(R4030_SYS_IT_STAT);
hardclock(cf);
timer_jazzio_ev.ev_count++;
/* Re-enable clock interrupts */
splx(MIPS_INT_MASK_4 | MIPS_SR_INT_IE);

View File

@ -1,4 +1,4 @@
/* $NetBSD: c_nec_jazz.c,v 1.8 2005/01/22 08:43:02 tsutsui Exp $ */
/* $NetBSD: c_nec_jazz.c,v 1.9 2005/08/20 17:58:49 tsutsui Exp $ */
/*-
* Copyright (C) 2000 Shuichiro URATA. All rights reserved.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: c_nec_jazz.c,v 1.8 2005/01/22 08:43:02 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: c_nec_jazz.c,v 1.9 2005/08/20 17:58:49 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -68,6 +68,7 @@ timer_nec_jazz_intr(uint32_t mask, struct clockframe *cf)
temp = in32(RD94_SYS_INTSTAT3);
hardclock(cf);
timer_jazzio_ev.ev_count++;
/* Re-enable clock interrupts */
splx(MIPS_INT_MASK_3 | MIPS_SR_INT_IE);

View File

@ -1,4 +1,4 @@
/* $NetBSD: timer_jazzio.c,v 1.6 2005/01/22 07:35:34 tsutsui Exp $ */
/* $NetBSD: timer_jazzio.c,v 1.7 2005/08/20 17:58:49 tsutsui Exp $ */
/* $OpenBSD: clock.c,v 1.6 1998/10/15 21:30:15 imp Exp $ */
/*
@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: timer_jazzio.c,v 1.6 2005/01/22 07:35:34 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: timer_jazzio.c,v 1.7 2005/08/20 17:58:49 tsutsui Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -116,6 +116,8 @@ struct timerfns timerfns_jazzio = {
struct timer_jazzio_config *timer_jazzio_conf = NULL;
int timer_jazzio_found = 0;
struct evcnt timer_jazzio_ev =
EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "jazzio", "timer");
int
timer_jazzio_match(struct device *parent, struct cfdata *match, void *aux)
@ -142,6 +144,7 @@ timer_jazzio_attach(struct device *parent, struct device *self, void *aux)
printf("\n");
evcnt_attach_static(&timer_jazzio_ev);
(*platform->set_intr)(timer_jazzio_conf->tjc_intr_mask,
timer_jazzio_conf->tjc_intr, 1);

View File

@ -1,4 +1,4 @@
/* $NetBSD: timer_jazziovar.h,v 1.3 2005/01/22 08:43:02 tsutsui Exp $ */
/* $NetBSD: timer_jazziovar.h,v 1.4 2005/08/20 17:58:49 tsutsui Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -43,3 +43,4 @@ struct timer_jazzio_config {
};
extern struct timer_jazzio_config *timer_jazzio_conf;
extern struct evcnt timer_jazzio_ev;