summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/irq_remapping.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2010-10-11 11:55:37 +0200
committerThomas Gleixner <tglx@linutronix.de>2010-10-12 16:53:42 +0200
commit1a0730d6649113c820217387a011a17dd4aff3ad (patch)
tree3b5240cb87605a72179885d1503f8f7297e4e224 /arch/x86/include/asm/irq_remapping.h
parentd585d060b42bd36f6f0b23ff327d3b91f80c7139 (diff)
x86: Speed up the irq_remapped check in hot pathes
irq_2_iommu is in struct irq_cfg, so we can do the irq_remapped check based on irq_cfg instead of going through a lookup function. That's especially interesting in the eoi_ioapic_irq() hotpath. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Ingo Molnar <mingo@elte.hu> Acked-by: Suresh Siddha <suresh.b.siddha@intel.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'arch/x86/include/asm/irq_remapping.h')
-rw-r--r--arch/x86/include/asm/irq_remapping.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/include/asm/irq_remapping.h b/arch/x86/include/asm/irq_remapping.h
index 8d841505344..1c23360fb2d 100644
--- a/arch/x86/include/asm/irq_remapping.h
+++ b/arch/x86/include/asm/irq_remapping.h
@@ -24,10 +24,18 @@ static inline void prepare_irte(struct irte *irte, int vector,
irte->dest_id = IRTE_DEST(dest);
irte->redir_hint = 1;
}
+static inline bool irq_remapped(struct irq_cfg *cfg)
+{
+ return cfg->irq_2_iommu.iommu != NULL;
+}
#else
static void prepare_irte(struct irte *irte, int vector, unsigned int dest)
{
}
+static inline bool irq_remapped(struct irq_cfg *cfg)
+{
+ return false;
+}
#endif
#endif /* _ASM_X86_IRQ_REMAPPING_H */