diff options
author | Suresh Siddha <suresh.b.siddha@intel.com> | 2008-07-10 14:16:56 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-12 02:45:05 -0400 |
commit | 89027d35aa5b8f45ce0f7fa0911db85b46563da0 (patch) | |
tree | bf2f9570231bbd4cc2cd24247059fdb72bdee57e /drivers/pci/intr_remapping.c | |
parent | 5c520a6724e912a7e6153b7597192edad6752750 (diff) |
x64, x2apic/intr-remap: IO-APIC support for interrupt-remapping
IO-APIC support in the presence of interrupt-remapping infrastructure.
IO-APIC RTE will be programmed with interrupt-remapping table entry(IRTE)
index and the IRTE will contain information about the vector, cpu destination,
trigger mode etc, which traditionally was present in the IO-APIC RTE.
Introduce a new irq_chip for cleaner irq migration (in the process
context as opposed to the current irq migration in the context of an interrupt.
interrupt-remapping infrastructure will help us achieve this cleanly).
For edge triggered, irq migration is a simple atomic update(of vector
and cpu destination) of IRTE and flush the hardware cache.
For level triggered, we need to modify the io-apic RTE aswell with the update
vector information, along with modifying IRTE with vector and cpu destination.
So irq migration for level triggered is little bit more complex compared to
edge triggered migration. But the good news is, we use the same algorithm
for level triggered migration as we have today, only difference being,
we now initiate the irq migration from process context instead of the
interrupt context.
In future, when we do a directed EOI (combined with cpu EOI broadcast
suppression) to the IO-APIC, level triggered irq migration will also be
as simple as edge triggered migration and we can do the irq migration
with a simple atomic update to IO-APIC RTE.
TBD: some tests/changes needed in the presence of fixup_irqs() for
level triggered irq migration.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: akpm@linux-foundation.org
Cc: arjan@linux.intel.com
Cc: andi@firstfloor.org
Cc: ebiederm@xmission.com
Cc: jbarnes@virtuousgeek.org
Cc: steiner@sgi.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/pci/intr_remapping.c')
-rw-r--r-- | drivers/pci/intr_remapping.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/pci/intr_remapping.c b/drivers/pci/intr_remapping.c index bddb4b19b6c7..32e55c7a9805 100644 --- a/drivers/pci/intr_remapping.c +++ b/drivers/pci/intr_remapping.c | |||
@@ -220,6 +220,16 @@ int flush_irte(int irq) | |||
220 | return 0; | 220 | return 0; |
221 | } | 221 | } |
222 | 222 | ||
223 | struct intel_iommu *map_ioapic_to_ir(int apic) | ||
224 | { | ||
225 | int i; | ||
226 | |||
227 | for (i = 0; i < MAX_IO_APICS; i++) | ||
228 | if (ir_ioapic[i].id == apic) | ||
229 | return ir_ioapic[i].iommu; | ||
230 | return NULL; | ||
231 | } | ||
232 | |||
223 | int free_irte(int irq) | 233 | int free_irte(int irq) |
224 | { | 234 | { |
225 | int index, i; | 235 | int index, i; |