mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-19 18:24:14 +08:00
d3f138106b
Change the CONFIG_DMAR to CONFIG_INTEL_IOMMU to be consistent with the other IOMMU options. Rename the CONFIG_INTR_REMAP to CONFIG_IRQ_REMAP to match the irq subsystem name. And define the CONFIG_DMAR_TABLE for the common ACPI DMAR routines shared by both CONFIG_INTEL_IOMMU and CONFIG_IRQ_REMAP. Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Cc: yinghai@kernel.org Cc: youquan.song@intel.com Cc: joerg.roedel@amd.com Cc: tony.luck@intel.com Cc: dwmw2@infradead.org Link: http://lkml.kernel.org/r/20110824001456.558630224@sbsiddha-desk.sc.intel.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
46 lines
1.2 KiB
C
46 lines
1.2 KiB
C
#ifndef _ASM_X86_IRQ_REMAPPING_H
|
|
#define _ASM_X86_IRQ_REMAPPING_H
|
|
|
|
#define IRTE_DEST(dest) ((x2apic_mode) ? dest : dest << 8)
|
|
|
|
#ifdef CONFIG_IRQ_REMAP
|
|
static void irq_remap_modify_chip_defaults(struct irq_chip *chip);
|
|
static inline void prepare_irte(struct irte *irte, int vector,
|
|
unsigned int dest)
|
|
{
|
|
memset(irte, 0, sizeof(*irte));
|
|
|
|
irte->present = 1;
|
|
irte->dst_mode = apic->irq_dest_mode;
|
|
/*
|
|
* Trigger mode in the IRTE will always be edge, and for IO-APIC, the
|
|
* actual level or edge trigger will be setup in the IO-APIC
|
|
* RTE. This will help simplify level triggered irq migration.
|
|
* For more details, see the comments (in io_apic.c) explainig IO-APIC
|
|
* irq migration in the presence of interrupt-remapping.
|
|
*/
|
|
irte->trigger_mode = 0;
|
|
irte->dlvry_mode = apic->irq_delivery_mode;
|
|
irte->vector = 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;
|
|
}
|
|
static inline void irq_remap_modify_chip_defaults(struct irq_chip *chip)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#endif /* _ASM_X86_IRQ_REMAPPING_H */
|