diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-10-11 09:55:37 (GMT) |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-10-12 14:53:42 (GMT) |
commit | 1a0730d6649113c820217387a011a17dd4aff3ad (patch) | |
tree | 3b5240cb87605a72179885d1503f8f7297e4e224 /arch/x86/include/asm/irq_remapping.h | |
parent | d585d060b42bd36f6f0b23ff327d3b91f80c7139 (diff) | |
download | linux-fsl-qoriq-1a0730d6649113c820217387a011a17dd4aff3ad.tar.xz |
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.h | 8 |
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 8d84150..1c23360 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 */ |