Re: [PATCH 03/28] x86/irq: Use irq_remap specific print_IO_APICpaths only on Intel

From: Joerg Roedel
Date: Fri Jul 06 2012 - 09:05:38 EST


On Fri, Jul 06, 2012 at 10:50:36AM +0200, Ingo Molnar wrote:
>
> * Joerg Roedel <joerg.roedel@xxxxxxx> wrote:
> > extern int irq_remapping_enabled;
> > +extern int intel_irq_remap_debug;

> Instead of yet another set of global flags thrown around the
> kernel please properly factor out this code, its data structures
> and methods: introduce a single descriptor structure that
> describes this piece of hardware, with debugging flags part of
> this structure - with operations function pointer structure and
> such.

Not sure I understand what you mean. So, simplified, from a hardware
point of view we have IO-APICs and MSIs. This doesn't change with
IOMMU-based interrupt remapping. The IO-APICs and MSIs are properly
abstraced through 'struct irq_chip'.

When an IOMMU comes into play the IO-APICs and MSIs need to be
programmed differently so that they send the IRQ messages in a way the
IOMMU can remap. This is done by using a different 'struct irq_chip'
when interrupt remapping is enabled.

For IRQ remapping there are two (not so much) different implementations
which are abstracted through 'struct irq_remap_ops' made accessible via
functions.

So what I _think_ you mean is to add another call-back to the
irq_remap_ops to print out debugging information and use that call-back
when IRQ remapping is enabled instead of the routine in io_apic.c. Is
that right?

Regards,

Joerg

--
AMD Operating System Research Center

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/