Subject: Question on interrupt handler invocation rules
To: None <tech-kern@netbsd.org>
From: Hayakawa Koichi <haya@ilink.sony.co.jp>
List: tech-kern
Date: 08/13/2001 19:05:33
I have some question on the invocation rules of interrupt
handlers.  Could someone teach me?

1. The invocatin order of interrupt handlers on a interrupt
   line is documented?

   Given more then one devices shares one interrupt line,
   such as PCI devices.  In this case, more than one
   interrupt handler is registered on an interrupt line.
   The invocation order of interrupt handlers on a interrupt
   line is documented clearly?

   Source code says interrupt handlers are called in
   registration order, at least on i386 and macppc.

2. Can an interrupt handler disestablishes other interrupt
   handlers on the same interrupt line?

3. Why higher priority interrupt handlers do not called
   earlier?

Background

The interrupt routine of a CardBus bridge should be called
earlier than that of a CardBus card.  When a CardBus card is
removed, the interrupt routine of the bridge should disable
the interrupt routine of the card before the routine touches
the card's registers.  This problem happens because a
CardBus card and a bridge shares same interruput line.

I want to change the interrupt handler manager in CardBus
bridge.  I don't want CardBus bridge to re-distribute
interrupt to child devices.  So I want to control invocation
order of interrupt handler strictly.
-- 
HAYAKAWA, Koichi