aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/irq_remapping.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2010-10-11 05:55:37 -0400
committerThomas Gleixner <tglx@linutronix.de>2010-10-12 10:53:42 -0400
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 8d841505344e..1c23360fb2d8 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,
24 irte->dest_id = IRTE_DEST(dest); 24 irte->dest_id = IRTE_DEST(dest);
25 irte->redir_hint = 1; 25 irte->redir_hint = 1;
26} 26}
27static inline bool irq_remapped(struct irq_cfg *cfg)
28{
29 return cfg->irq_2_iommu.iommu != NULL;
30}
27#else 31#else
28static void prepare_irte(struct irte *irte, int vector, unsigned int dest) 32static void prepare_irte(struct irte *irte, int vector, unsigned int dest)
29{ 33{
30} 34}
35static inline bool irq_remapped(struct irq_cfg *cfg)
36{
37 return false;
38}
31#endif 39#endif
32 40
33#endif /* _ASM_X86_IRQ_REMAPPING_H */ 41#endif /* _ASM_X86_IRQ_REMAPPING_H */