Subject: Re: results of the IRC debug patch
To: Michael <macallan18@earthlink.net>
From: Tim Kelly <hockey@dialectronics.com>
List: port-macppc
Date: 12/04/2004 09:00:10
Hi Michael,

>Hmm, in my naivity I'd think that assigning different virqs to PCI devices
>sharing the same IRQ ( be it >through a bridge or different functions of
>the same device, like many USB controllers ) isn't a bad thing - >this
>could hide the sharing from the drivers - well, as long as the kernel can
>figure out where the IRQ >really came from. Can it do that with a PCI
>bridge? I mean - is there a register in the bridge to indicate >which
>slots fired IRQs?

I would think pretty much the same thing, in that the virq mechanism helps
make the interrupt masking process easier. It does run into problems when
there are more than 28 hardware irqs, though, since the virq value is just
32 bits. I think this is where the none/edge/level/pulse stuff in
intr_establish is supposed to encode a difference, but I don't see on the
backend there's decoding to differentiate.

Isn't the bridge responsible for tracking which devices are behind it and
what they do, based on the PCI tag?

>So I guess everything on the USB card ( 3xOHCI, 1x EHCI ) should share the
>same virq, but the audio card >should get a different one.

It seems to me that devices with different IPL levels shouldn't share
virqs, too.

I have to head to work now.

tim