Subject: Re: CVS commit: syssrc
To: Jason R Thorpe <thorpej@zembu.com>
From: Ben Harris <bjh21@netbsd.org>
List: tech-kern
Date: 01/07/2001 18:57:51
On Sun, 7 Jan 2001, Jason R Thorpe wrote:

> On Sun, Jan 07, 2001 at 07:02:00PM +0200, Ben Harris wrote:
> 
>  > Modified Files:
>  > 	syssrc/sys/arch/arm26/arm26: db_interface.c db_machdep.c irq.c
>  > 	syssrc/sys/arch/arm26/include: irq.h
>  > 
>  > Log Message:
>  > Add facilities for counting interrupts, and a "machine irqstat" command to
>  > DDB to tell us what's going on.
> 
> This really should be done using the evcnt interface.

I'm using the evcnt interface to the extent that each interrupt handler
now has a struct evcnt in it which holds the count.  Reading evcnt(9),
though, it looks like I should be deferring the counting of interrupts to
device drivers, though most MI drivers don't keep their own counts.  
Should I consider this to be a bug in those drivers and fix them?

It seems to me that it's rather more sensible for the IRQ dispatcher to
handle the counters, since that only needs the code to appear once, rather
than once per device driver.

-- 
Ben Harris                                                   <bjh21@netbsd.org>
Portmaster, NetBSD/arm26               <URL:http://www.netbsd.org/Ports/arm26/>