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

From: [email-masked] (Eric W. Biederman)
Date: Fri, 26 Jan 2007 00:02:15 -0700

Grant Grundler <[email-masked]> writes:

> 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.

I don't have a clue why it is called virq.  But looking at the
usage it must be a linux irq number as shown in /proc/interrupts and
as such there need be no connection with hardware.

I believe the ppc model is to allocate an interrupt source on their
existing interrupt controller and use that instead of the normal x86
case of having the MSI interrupt go transparently to the cpu.

Both set_irq_type, and entries.vector take a linux irq number.
Darn we should change that field name, it is misleading.

Eric