Subject: Re: [RFC/PATCH 14/16] MPIC MSI backend

From: Benjamin Herrenschmidt <[email-masked]>
Date: Sat, 27 Jan 2007 07:41:56 +1100

On Thu, 2007-01-25 at 23:43 -0700, Grant Grundler wrote:
> On Thu, Jan 25, 2007 at 07:34:16PM +1100, Michael Ellerman wrote:
> > MPIC MSI backend. Based on code from Segher, heavily hacked by me.
> > Renamed to mpic_htmsi, as it only deals with MSI over Hypertransport.
> ...
> > +		/* FIXME should we save the existing type */
> > +		set_irq_type(virq, IRQ_TYPE_EDGE_RISING);
> 
> What exactly does the "virq" represent here?
> I'd like to understand if the FIXME comment could be dropped (or not).
> 
> I don't get the impression it's related to a PCI IRQ line.
> Maybe irq_create_mapping() has comments that describe hwirq and virq?
> If not, it would be useful if those terms were described.

Well, this is a ppc specific backend, so I'm not sure we need to
describe in there the way ppc interrupts work but heh ;-) Basically, on
powerpc nowadays, we disconnect "linux" irqs (virtual irqs) and
"hardware" irq numbers.

linux irqs are allocated dynamically and bound to a given PIC/hw irq
pair via irq_create_mapping() or one of the other superset of that
function.

In the case of something like the MPIC MSI backend, we first allocate a
HW vector (we have a bitmap of free vectors), then we map it to a new
virq with irq_create_mapping(). I think the FIXME is not needed.

Ben.