Subject: Re: results of the IRC debug patch
To: Pavel Cahyna <pavel.cahyna@st.mff.cuni.cz>
From: Tim Kelly <hockey@dialectronics.com>
List: port-macppc
Date: 12/04/2004 15:04:58
At 8:52 PM +0100 12/4/04, Pavel Cahyna wrote:
>
>The following thread might answer some of your PCI bridge/interrupt
>questions:
>
>http://mail-index.netbsd.org/tech-kern/2004/08/13/0002.html

Very interesting. Later in the thread Nathan Williams wrote
http://mail-index.netbsd.org/tech-kern/2004/08/14/0002.html

> B) It is _not_ possible to determine which PCI device caused the
> interrupt. In that case the interrupt routing code needs to be extended
> so that it calls all interrupt handlers related to this interrupt.
>
> From what it looks like and what you told me B) is the case.

(b) is the case. PCI does not have a generic register that indicates
an interrupt, and reading the device-specific registers that indicate
whether a device is responsible for the interrupt is exactly the job
of the device's interrupt handlers (and is the reason why interrupt
handlers return a value to say whether they handled the interrupt or
not).

(end)

The code in extintr.c does not examine the returned value.

                ih = is->is_hand;
                while (ih) {
                        (*ih->ih_fun)(ih->ih_arg);
                        ih = ih->ih_next;
                }


tim