[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120925130456.GZ2505@amd.com>
Date: Tue, 25 Sep 2012 15:04:56 +0200
From: Joerg Roedel <joerg.roedel@....com>
To: Sebastian Andrzej Siewior <sebastian@...akpoint.cc>
CC: <x86@...nel.org>, <linux-kernel@...r.kernel.org>,
<joro@...tes.org>, Suresh Siddha <suresh.b.siddha@...el.com>,
Yinghai Lu <yinghai@...nel.org>
Subject: Re: [PATCH 12/19] x86, irq: Add data structure to keep AMD specific
irq remapping information
On Sun, Aug 26, 2012 at 08:21:26PM +0200, Sebastian Andrzej Siewior wrote:
> On Mon, Aug 20, 2012 at 03:55:58PM +0200, Joerg Roedel wrote:
> > --- a/arch/x86/include/asm/hw_irq.h
> > +++ b/arch/x86/include/asm/hw_irq.h
> > @@ -101,6 +101,7 @@ static inline void set_io_apic_irq_attr(struct io_apic_irq_attr *irq_attr,
> > irq_attr->polarity = polarity;
> > }
> >
> > +/* Intel specific interrupt remapping information */
> > struct irq_2_iommu {
> > struct intel_iommu *iommu;
> > u16 irte_index;
> > @@ -108,6 +109,12 @@ struct irq_2_iommu {
> > u8 irte_mask;
> > };
> >
> > +/* AMD specific interrupt remapping information */
> > +struct irq_2_irte {
> > + u16 devid; /* Device ID for IRTE table */
> > + u16 index; /* Index into IRTE table*/
> > +};
> so irte_index like in iommu case would make the comment superfluous. However
> the struct is already named _irte...
> However, the "{Intel|AMD} specific..." is helpfull since irte and such are
> present in both.
Yes, the structs also represent the differences in the remapping
hardware between Intel and AMD very well. On Intel there is one
remapping table per hardware IOMMU so it is important to get from a
given irq to the IOMMU and its remapping table to find the IRTE.
On AMD hardware there is a remapping table per device. So the
coresponding device id is stored in the struct to find the right
remapping table.
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists