Chris G Demetriou <Chris_G_Demetriou@ux2.sp.cs.cmu.edu> writes:
> That's not unreasonable. However, it has a couple of drawbacks:
> (1) If a good interrupt counting mechanism existed, this would
> not be necessary.
>
> (2) It screws up the totals.
>
> Any scheme which doesn't bother to take hierarchy into account will do
> (2)...
Would it be possible to, somehow, build a hierachy by calling the event
attach routine with some handle to the parent's counter?
That would solve most of this, since the bus interrupt attach code could
return a pointer to its counter and when a card probes and attaches children
they can also be given a pointer.
Also, would it be good to consider having two "standard" counters?
One for interrupts claimed, one for interrupts which might have been
claimed, and one for calls to the handler when it was not really
needed? Of course, that makes the above more complicated, but at
least "bad" or "wasteful" drivers can be fould and perhaps fixed.
--Michael