Commit d3f13810 authored by Suresh Siddha's avatar Suresh Siddha Committed by Ingo Molnar

iommu: Rename the DMAR and INTR_REMAP config options

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: default avatarSuresh 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.comSigned-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent c39d77ff
...@@ -234,4 +234,4 @@ CONFIG_CRYPTO_MD5=y ...@@ -234,4 +234,4 @@ CONFIG_CRYPTO_MD5=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set # CONFIG_CRYPTO_ANSI_CPRNG is not set
CONFIG_CRC_T10DIF=y CONFIG_CRC_T10DIF=y
CONFIG_MISC_DEVICES=y CONFIG_MISC_DEVICES=y
CONFIG_DMAR=y CONFIG_INTEL_IOMMU=y
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# #
obj-y := setup.o obj-y := setup.o
ifeq ($(CONFIG_DMAR), y) ifeq ($(CONFIG_INTEL_IOMMU), y)
obj-$(CONFIG_IA64_GENERIC) += machvec.o machvec_vtd.o obj-$(CONFIG_IA64_GENERIC) += machvec.o machvec_vtd.o
else else
obj-$(CONFIG_IA64_GENERIC) += machvec.o obj-$(CONFIG_IA64_GENERIC) += machvec.o
......
...@@ -10,7 +10,7 @@ struct dev_archdata { ...@@ -10,7 +10,7 @@ struct dev_archdata {
#ifdef CONFIG_ACPI #ifdef CONFIG_ACPI
void *acpi_handle; void *acpi_handle;
#endif #endif
#ifdef CONFIG_DMAR #ifdef CONFIG_INTEL_IOMMU
void *iommu; /* hook for IOMMU specific extension */ void *iommu; /* hook for IOMMU specific extension */
#endif #endif
}; };
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
extern void pci_iommu_shutdown(void); extern void pci_iommu_shutdown(void);
extern void no_iommu_init(void); extern void no_iommu_init(void);
#ifdef CONFIG_DMAR #ifdef CONFIG_INTEL_IOMMU
extern int force_iommu, no_iommu; extern int force_iommu, no_iommu;
extern int iommu_pass_through; extern int iommu_pass_through;
extern int iommu_detected; extern int iommu_detected;
......
...@@ -139,7 +139,7 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) ...@@ -139,7 +139,7 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
return channel ? isa_irq_to_vector(15) : isa_irq_to_vector(14); return channel ? isa_irq_to_vector(15) : isa_irq_to_vector(14);
} }
#ifdef CONFIG_DMAR #ifdef CONFIG_INTEL_IOMMU
extern void pci_iommu_alloc(void); extern void pci_iommu_alloc(void);
#endif #endif
#endif /* _ASM_IA64_PCI_H */ #endif /* _ASM_IA64_PCI_H */
...@@ -43,7 +43,7 @@ obj-$(CONFIG_IA64_ESI) += esi.o ...@@ -43,7 +43,7 @@ obj-$(CONFIG_IA64_ESI) += esi.o
ifneq ($(CONFIG_IA64_ESI),) ifneq ($(CONFIG_IA64_ESI),)
obj-y += esi_stub.o # must be in kernel proper obj-y += esi_stub.o # must be in kernel proper
endif endif
obj-$(CONFIG_DMAR) += pci-dma.o obj-$(CONFIG_INTEL_IOMMU) += pci-dma.o
obj-$(CONFIG_SWIOTLB) += pci-swiotlb.o obj-$(CONFIG_SWIOTLB) += pci-swiotlb.o
obj-$(CONFIG_BINFMT_ELF) += elfcore.o obj-$(CONFIG_BINFMT_ELF) += elfcore.o
......
...@@ -88,7 +88,7 @@ acpi_get_sysname(void) ...@@ -88,7 +88,7 @@ acpi_get_sysname(void)
struct acpi_table_rsdp *rsdp; struct acpi_table_rsdp *rsdp;
struct acpi_table_xsdt *xsdt; struct acpi_table_xsdt *xsdt;
struct acpi_table_header *hdr; struct acpi_table_header *hdr;
#ifdef CONFIG_DMAR #ifdef CONFIG_INTEL_IOMMU
u64 i, nentries; u64 i, nentries;
#endif #endif
...@@ -125,7 +125,7 @@ acpi_get_sysname(void) ...@@ -125,7 +125,7 @@ acpi_get_sysname(void)
return "xen"; return "xen";
} }
#ifdef CONFIG_DMAR #ifdef CONFIG_INTEL_IOMMU
/* Look for Intel IOMMU */ /* Look for Intel IOMMU */
nentries = (hdr->length - sizeof(*hdr)) / nentries = (hdr->length - sizeof(*hdr)) /
sizeof(xsdt->table_offset_entry[0]); sizeof(xsdt->table_offset_entry[0]);
......
...@@ -131,7 +131,7 @@ void arch_teardown_msi_irq(unsigned int irq) ...@@ -131,7 +131,7 @@ void arch_teardown_msi_irq(unsigned int irq)
return ia64_teardown_msi_irq(irq); return ia64_teardown_msi_irq(irq);
} }
#ifdef CONFIG_DMAR #ifdef CONFIG_INTEL_IOMMU
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
static int dmar_msi_set_affinity(struct irq_data *data, static int dmar_msi_set_affinity(struct irq_data *data,
const struct cpumask *mask, bool force) const struct cpumask *mask, bool force)
...@@ -210,5 +210,5 @@ int arch_setup_dmar_msi(unsigned int irq) ...@@ -210,5 +210,5 @@ int arch_setup_dmar_msi(unsigned int irq)
"edge"); "edge");
return 0; return 0;
} }
#endif /* CONFIG_DMAR */ #endif /* CONFIG_INTEL_IOMMU */
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <asm/system.h> #include <asm/system.h>
#ifdef CONFIG_DMAR #ifdef CONFIG_INTEL_IOMMU
#include <linux/kernel.h> #include <linux/kernel.h>
......
...@@ -130,7 +130,7 @@ config SBUS ...@@ -130,7 +130,7 @@ config SBUS
bool bool
config NEED_DMA_MAP_STATE config NEED_DMA_MAP_STATE
def_bool (X86_64 || DMAR || DMA_API_DEBUG) def_bool (X86_64 || INTEL_IOMMU || DMA_API_DEBUG)
config NEED_SG_DMA_LENGTH config NEED_SG_DMA_LENGTH
def_bool y def_bool y
...@@ -220,7 +220,7 @@ config ARCH_SUPPORTS_DEBUG_PAGEALLOC ...@@ -220,7 +220,7 @@ config ARCH_SUPPORTS_DEBUG_PAGEALLOC
config HAVE_INTEL_TXT config HAVE_INTEL_TXT
def_bool y def_bool y
depends on EXPERIMENTAL && DMAR && ACPI depends on EXPERIMENTAL && INTEL_IOMMU && ACPI
config X86_32_SMP config X86_32_SMP
def_bool y def_bool y
...@@ -287,7 +287,7 @@ config SMP ...@@ -287,7 +287,7 @@ config SMP
config X86_X2APIC config X86_X2APIC
bool "Support x2apic" bool "Support x2apic"
depends on X86_LOCAL_APIC && X86_64 && INTR_REMAP depends on X86_LOCAL_APIC && X86_64 && IRQ_REMAP
---help--- ---help---
This enables x2apic support on CPUs that have this feature. This enables x2apic support on CPUs that have this feature.
......
...@@ -67,8 +67,8 @@ CONFIG_CPU_FREQ_GOV_PERFORMANCE=y ...@@ -67,8 +67,8 @@ CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_X86_ACPI_CPUFREQ=y CONFIG_X86_ACPI_CPUFREQ=y
CONFIG_PCI_MMCONFIG=y CONFIG_PCI_MMCONFIG=y
CONFIG_DMAR=y CONFIG_INTEL_IOMMU=y
# CONFIG_DMAR_DEFAULT_ON is not set # CONFIG_INTEL_IOMMU_DEFAULT_ON is not set
CONFIG_PCIEPORTBUS=y CONFIG_PCIEPORTBUS=y
CONFIG_PCCARD=y CONFIG_PCCARD=y
CONFIG_YENTA=y CONFIG_YENTA=y
......
...@@ -8,7 +8,7 @@ struct dev_archdata { ...@@ -8,7 +8,7 @@ struct dev_archdata {
#ifdef CONFIG_X86_64 #ifdef CONFIG_X86_64
struct dma_map_ops *dma_ops; struct dma_map_ops *dma_ops;
#endif #endif
#if defined(CONFIG_DMAR) || defined(CONFIG_AMD_IOMMU) #if defined(CONFIG_INTEL_IOMMU) || defined(CONFIG_AMD_IOMMU)
void *iommu; /* hook for IOMMU specific extension */ void *iommu; /* hook for IOMMU specific extension */
#endif #endif
}; };
......
...@@ -119,7 +119,7 @@ struct irq_cfg { ...@@ -119,7 +119,7 @@ struct irq_cfg {
cpumask_var_t old_domain; cpumask_var_t old_domain;
u8 vector; u8 vector;
u8 move_in_progress : 1; u8 move_in_progress : 1;
#ifdef CONFIG_INTR_REMAP #ifdef CONFIG_IRQ_REMAP
struct irq_2_iommu irq_2_iommu; struct irq_2_iommu irq_2_iommu;
#endif #endif
}; };
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#define IRTE_DEST(dest) ((x2apic_mode) ? dest : dest << 8) #define IRTE_DEST(dest) ((x2apic_mode) ? dest : dest << 8)
#ifdef CONFIG_INTR_REMAP #ifdef CONFIG_IRQ_REMAP
static void irq_remap_modify_chip_defaults(struct irq_chip *chip); static void irq_remap_modify_chip_defaults(struct irq_chip *chip);
static inline void prepare_irte(struct irte *irte, int vector, static inline void prepare_irte(struct irte *irte, int vector,
unsigned int dest) unsigned int dest)
......
...@@ -1437,7 +1437,7 @@ void enable_x2apic(void) ...@@ -1437,7 +1437,7 @@ void enable_x2apic(void)
int __init enable_IR(void) int __init enable_IR(void)
{ {
#ifdef CONFIG_INTR_REMAP #ifdef CONFIG_IRQ_REMAP
if (!intr_remapping_supported()) { if (!intr_remapping_supported()) {
pr_debug("intr-remapping not supported\n"); pr_debug("intr-remapping not supported\n");
return -1; return -1;
......
...@@ -2254,7 +2254,7 @@ ioapic_set_affinity(struct irq_data *data, const struct cpumask *mask, ...@@ -2254,7 +2254,7 @@ ioapic_set_affinity(struct irq_data *data, const struct cpumask *mask,
return ret; return ret;
} }
#ifdef CONFIG_INTR_REMAP #ifdef CONFIG_IRQ_REMAP
/* /*
* Migrate the IO-APIC irq in the presence of intr-remapping. * Migrate the IO-APIC irq in the presence of intr-remapping.
...@@ -2560,7 +2560,7 @@ static void ack_apic_level(struct irq_data *data) ...@@ -2560,7 +2560,7 @@ static void ack_apic_level(struct irq_data *data)
} }
} }
#ifdef CONFIG_INTR_REMAP #ifdef CONFIG_IRQ_REMAP
static void ir_ack_apic_edge(struct irq_data *data) static void ir_ack_apic_edge(struct irq_data *data)
{ {
ack_APIC_irq(); ack_APIC_irq();
...@@ -2587,7 +2587,7 @@ static void irq_remap_modify_chip_defaults(struct irq_chip *chip) ...@@ -2587,7 +2587,7 @@ static void irq_remap_modify_chip_defaults(struct irq_chip *chip)
chip->irq_set_affinity = ir_ioapic_set_affinity; chip->irq_set_affinity = ir_ioapic_set_affinity;
#endif #endif
} }
#endif /* CONFIG_INTR_REMAP */ #endif /* CONFIG_IRQ_REMAP */
static struct irq_chip ioapic_chip __read_mostly = { static struct irq_chip ioapic_chip __read_mostly = {
.name = "IO-APIC", .name = "IO-APIC",
...@@ -3285,7 +3285,7 @@ void native_teardown_msi_irq(unsigned int irq) ...@@ -3285,7 +3285,7 @@ void native_teardown_msi_irq(unsigned int irq)
destroy_irq(irq); destroy_irq(irq);
} }
#if defined (CONFIG_DMAR) || defined (CONFIG_INTR_REMAP) #ifdef CONFIG_DMAR_TABLE
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
static int static int
dmar_msi_set_affinity(struct irq_data *data, const struct cpumask *mask, dmar_msi_set_affinity(struct irq_data *data, const struct cpumask *mask,
......
...@@ -30,10 +30,10 @@ ...@@ -30,10 +30,10 @@
/* /*
* If we have Intel graphics, we're not going to have anything other than * If we have Intel graphics, we're not going to have anything other than
* an Intel IOMMU. So make the correct use of the PCI DMA API contingent * an Intel IOMMU. So make the correct use of the PCI DMA API contingent
* on the Intel IOMMU support (CONFIG_DMAR). * on the Intel IOMMU support (CONFIG_INTEL_IOMMU).
* Only newer chipsets need to bother with this, of course. * Only newer chipsets need to bother with this, of course.
*/ */
#ifdef CONFIG_DMAR #ifdef CONFIG_INTEL_IOMMU
#define USE_PCI_DMA_API 1 #define USE_PCI_DMA_API 1
#else #else
#define USE_PCI_DMA_API 0 #define USE_PCI_DMA_API 0
......
...@@ -59,10 +59,14 @@ config AMD_IOMMU_STATS ...@@ -59,10 +59,14 @@ config AMD_IOMMU_STATS
If unsure, say N. If unsure, say N.
# Intel IOMMU support # Intel IOMMU support
config DMAR config DMAR_TABLE
bool "Support for DMA Remapping Devices" bool
config INTEL_IOMMU
bool "Support for Intel IOMMU using DMA Remapping Devices"
depends on PCI_MSI && ACPI && (X86 || IA64_GENERIC) depends on PCI_MSI && ACPI && (X86 || IA64_GENERIC)
select IOMMU_API select IOMMU_API
select DMAR_TABLE
help help
DMA remapping (DMAR) devices support enables independent address DMA remapping (DMAR) devices support enables independent address
translations for Direct Memory Access (DMA) from devices. translations for Direct Memory Access (DMA) from devices.
...@@ -70,18 +74,18 @@ config DMAR ...@@ -70,18 +74,18 @@ config DMAR
and include PCI device scope covered by these DMA and include PCI device scope covered by these DMA
remapping devices. remapping devices.
config DMAR_DEFAULT_ON config INTEL_IOMMU_DEFAULT_ON
def_bool y def_bool y
prompt "Enable DMA Remapping Devices by default" prompt "Enable Intel DMA Remapping Devices by default"
depends on DMAR depends on INTEL_IOMMU
help help
Selecting this option will enable a DMAR device at boot time if Selecting this option will enable a DMAR device at boot time if
one is found. If this option is not selected, DMAR support can one is found. If this option is not selected, DMAR support can
be enabled by passing intel_iommu=on to the kernel. be enabled by passing intel_iommu=on to the kernel.
config DMAR_BROKEN_GFX_WA config INTEL_IOMMU_BROKEN_GFX_WA
bool "Workaround broken graphics drivers (going away soon)" bool "Workaround broken graphics drivers (going away soon)"
depends on DMAR && BROKEN && X86 depends on INTEL_IOMMU && BROKEN && X86
---help--- ---help---
Current Graphics drivers tend to use physical address Current Graphics drivers tend to use physical address
for DMA and avoid using DMA APIs. Setting this config for DMA and avoid using DMA APIs. Setting this config
...@@ -90,18 +94,19 @@ config DMAR_BROKEN_GFX_WA ...@@ -90,18 +94,19 @@ config DMAR_BROKEN_GFX_WA
to use physical addresses for DMA, at least until this to use physical addresses for DMA, at least until this
option is removed in the 2.6.32 kernel. option is removed in the 2.6.32 kernel.
config DMAR_FLOPPY_WA config INTEL_IOMMU_FLOPPY_WA
def_bool y def_bool y
depends on DMAR && X86 depends on INTEL_IOMMU && X86
---help--- ---help---
Floppy disk drivers are known to bypass DMA API calls Floppy disk drivers are known to bypass DMA API calls
thereby failing to work when IOMMU is enabled. This thereby failing to work when IOMMU is enabled. This
workaround will setup a 1:1 mapping for the first workaround will setup a 1:1 mapping for the first
16MiB to make floppy (an ISA device) work. 16MiB to make floppy (an ISA device) work.
config INTR_REMAP config IRQ_REMAP
bool "Support for Interrupt Remapping (EXPERIMENTAL)" bool "Support for Interrupt Remapping (EXPERIMENTAL)"
depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI && EXPERIMENTAL depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI && EXPERIMENTAL
select DMAR_TABLE
---help--- ---help---
Supports Interrupt remapping for IO-APIC and MSI devices. Supports Interrupt remapping for IO-APIC and MSI devices.
To use x2apic mode in the CPU's which support x2APIC enhancements or To use x2apic mode in the CPU's which support x2APIC enhancements or
......
obj-$(CONFIG_IOMMU_API) += iommu.o obj-$(CONFIG_IOMMU_API) += iommu.o
obj-$(CONFIG_MSM_IOMMU) += msm_iommu.o msm_iommu_dev.o obj-$(CONFIG_MSM_IOMMU) += msm_iommu.o msm_iommu_dev.o
obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o amd_iommu_init.o obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o amd_iommu_init.o
obj-$(CONFIG_DMAR) += dmar.o iova.o intel-iommu.o obj-$(CONFIG_DMAR_TABLE) += dmar.o
obj-$(CONFIG_INTR_REMAP) += dmar.o intr_remapping.o obj-$(CONFIG_INTEL_IOMMU) += iova.o intel-iommu.o
obj-$(CONFIG_IRQ_REMAP) += intr_remapping.o
...@@ -393,11 +393,11 @@ static long list_size; ...@@ -393,11 +393,11 @@ static long list_size;
static void domain_remove_dev_info(struct dmar_domain *domain); static void domain_remove_dev_info(struct dmar_domain *domain);
#ifdef CONFIG_DMAR_DEFAULT_ON #ifdef CONFIG_INTEL_IOMMU_DEFAULT_ON
int dmar_disabled = 0; int dmar_disabled = 0;
#else #else
int dmar_disabled = 1; int dmar_disabled = 1;
#endif /*CONFIG_DMAR_DEFAULT_ON*/ #endif /*CONFIG_INTEL_IOMMU_DEFAULT_ON*/
static int dmar_map_gfx = 1; static int dmar_map_gfx = 1;
static int dmar_forcedac; static int dmar_forcedac;
...@@ -2150,7 +2150,7 @@ static inline int iommu_prepare_rmrr_dev(struct dmar_rmrr_unit *rmrr, ...@@ -2150,7 +2150,7 @@ static inline int iommu_prepare_rmrr_dev(struct dmar_rmrr_unit *rmrr,
rmrr->end_address); rmrr->end_address);
} }
#ifdef CONFIG_DMAR_FLOPPY_WA #ifdef CONFIG_INTEL_IOMMU_FLOPPY_WA
static inline void iommu_prepare_isa(void) static inline void iommu_prepare_isa(void)
{ {
struct pci_dev *pdev; struct pci_dev *pdev;
...@@ -2173,7 +2173,7 @@ static inline void iommu_prepare_isa(void) ...@@ -2173,7 +2173,7 @@ static inline void iommu_prepare_isa(void)
{ {
return; return;
} }
#endif /* !CONFIG_DMAR_FLPY_WA */ #endif /* !CONFIG_INTEL_IOMMU_FLPY_WA */
static int md_domain_init(struct dmar_domain *domain, int guest_width); static int md_domain_init(struct dmar_domain *domain, int guest_width);
...@@ -2484,7 +2484,7 @@ static int __init init_dmars(void) ...@@ -2484,7 +2484,7 @@ static int __init init_dmars(void)
if (iommu_pass_through) if (iommu_pass_through)
iommu_identity_mapping |= IDENTMAP_ALL; iommu_identity_mapping |= IDENTMAP_ALL;
#ifdef CONFIG_DMAR_BROKEN_GFX_WA #ifdef CONFIG_INTEL_IOMMU_BROKEN_GFX_WA
iommu_identity_mapping |= IDENTMAP_GFX; iommu_identity_mapping |= IDENTMAP_GFX;
#endif #endif
......
...@@ -2788,7 +2788,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5CE823, ricoh_ ...@@ -2788,7 +2788,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5CE823, ricoh_
DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5CE823, ricoh_mmc_fixup_r5c832); DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5CE823, ricoh_mmc_fixup_r5c832);
#endif /*CONFIG_MMC_RICOH_MMC*/ #endif /*CONFIG_MMC_RICOH_MMC*/
#if defined(CONFIG_DMAR) || defined(CONFIG_INTR_REMAP) #ifdef CONFIG_DMAR_TABLE
#define VTUNCERRMSK_REG 0x1ac #define VTUNCERRMSK_REG 0x1ac
#define VTD_MSK_SPEC_ERRORS (1 << 31) #define VTD_MSK_SPEC_ERRORS (1 << 31)
/* /*
......
...@@ -26,7 +26,7 @@ struct dmar_domain; ...@@ -26,7 +26,7 @@ struct dmar_domain;
struct root_entry; struct root_entry;
#ifdef CONFIG_DMAR #ifdef CONFIG_INTEL_IOMMU
extern void free_dmar_iommu(struct intel_iommu *iommu); extern void free_dmar_iommu(struct intel_iommu *iommu);
extern int iommu_calculate_agaw(struct intel_iommu *iommu); extern int iommu_calculate_agaw(struct intel_iommu *iommu);
extern int iommu_calculate_max_sagaw(struct intel_iommu *iommu); extern int iommu_calculate_max_sagaw(struct intel_iommu *iommu);
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#define DMAR_X2APIC_OPT_OUT 0x2 #define DMAR_X2APIC_OPT_OUT 0x2
struct intel_iommu; struct intel_iommu;
#if defined(CONFIG_DMAR) || defined(CONFIG_INTR_REMAP) #ifdef CONFIG_DMAR_TABLE
extern struct acpi_table_header *dmar_tbl; extern struct acpi_table_header *dmar_tbl;
struct dmar_drhd_unit { struct dmar_drhd_unit {
struct list_head list; /* list of drhd units */ struct list_head list; /* list of drhd units */
...@@ -81,7 +81,7 @@ static inline int enable_drhd_fault_handling(void) ...@@ -81,7 +81,7 @@ static inline int enable_drhd_fault_handling(void)
{ {
return -1; return -1;
} }
#endif /* !CONFIG_DMAR && !CONFIG_INTR_REMAP */ #endif /* !CONFIG_DMAR_TABLE */
struct irte { struct irte {
union { union {
...@@ -112,7 +112,7 @@ struct irte { ...@@ -112,7 +112,7 @@ struct irte {
}; };
}; };
#ifdef CONFIG_INTR_REMAP #ifdef CONFIG_IRQ_REMAP
extern int intr_remapping_enabled; extern int intr_remapping_enabled;
extern int intr_remapping_supported(void); extern int intr_remapping_supported(void);
extern int enable_intr_remapping(void); extern int enable_intr_remapping(void);
...@@ -214,7 +214,7 @@ extern int dmar_set_interrupt(struct intel_iommu *iommu); ...@@ -214,7 +214,7 @@ extern int dmar_set_interrupt(struct intel_iommu *iommu);
extern irqreturn_t dmar_fault(int irq, void *dev_id); extern irqreturn_t dmar_fault(int irq, void *dev_id);
extern int arch_setup_dmar_msi(unsigned int irq); extern int arch_setup_dmar_msi(unsigned int irq);
#ifdef CONFIG_DMAR #ifdef CONFIG_INTEL_IOMMU
extern int iommu_detected, no_iommu; extern int iommu_detected, no_iommu;
extern struct list_head dmar_rmrr_units; extern struct list_head dmar_rmrr_units;
struct dmar_rmrr_unit { struct dmar_rmrr_unit {
...@@ -243,7 +243,7 @@ extern int dmar_parse_one_atsr(struct acpi_dmar_header *header); ...@@ -243,7 +243,7 @@ extern int dmar_parse_one_atsr(struct acpi_dmar_header *header);
extern int dmar_parse_dev_scope(void *start, void *end, int *cnt, extern int dmar_parse_dev_scope(void *start, void *end, int *cnt,
struct pci_dev ***devices, u16 segment); struct pci_dev ***devices, u16 segment);
extern int intel_iommu_init(void); extern int intel_iommu_init(void);
#else /* !CONFIG_DMAR: */ #else /* !CONFIG_INTEL_IOMMU: */
static inline int intel_iommu_init(void) { return -ENODEV; } static inline int intel_iommu_init(void) { return -ENODEV; }
static inline int dmar_parse_one_rmrr(struct acpi_dmar_header *header) static inline int dmar_parse_one_rmrr(struct acpi_dmar_header *header)
{ {
...@@ -257,6 +257,6 @@ static inline int dmar_parse_rmrr_atsr_dev(void) ...@@ -257,6 +257,6 @@ static inline int dmar_parse_rmrr_atsr_dev(void)
{ {
return 0; return 0;
} }
#endif /* CONFIG_DMAR */ #endif /* CONFIG_INTEL_IOMMU */
#endif /* __DMAR_H__ */ #endif /* __DMAR_H__ */
...@@ -279,7 +279,7 @@ struct q_inval { ...@@ -279,7 +279,7 @@ struct q_inval {
int free_cnt; int free_cnt;
}; };
#ifdef CONFIG_INTR_REMAP #ifdef CONFIG_IRQ_REMAP
/* 1MB - maximum possible interrupt remapping table size */ /* 1MB - maximum possible interrupt remapping table size */
#define INTR_REMAP_PAGE_ORDER 8 #define INTR_REMAP_PAGE_ORDER 8
#define INTR_REMAP_TABLE_REG_SIZE 0xf #define INTR_REMAP_TABLE_REG_SIZE 0xf
...@@ -318,7 +318,7 @@ struct intel_iommu { ...@@ -318,7 +318,7 @@ struct intel_iommu {
unsigned int irq; unsigned int irq;
unsigned char name[13]; /* Device Name */ unsigned char name[13]; /* Device Name */
#ifdef CONFIG_DMAR #ifdef CONFIG_INTEL_IOMMU
unsigned long *domain_ids; /* bitmap of domains */ unsigned long *domain_ids; /* bitmap of domains */
struct dmar_domain **domains; /* ptr to domains */ struct dmar_domain **domains; /* ptr to domains */
spinlock_t lock; /* protect context, domain ids */ spinlock_t lock; /* protect context, domain ids */
...@@ -329,7 +329,7 @@ struct intel_iommu { ...@@ -329,7 +329,7 @@ struct intel_iommu {
struct q_inval *qi; /* Queued invalidation info */ struct q_inval *qi; /* Queued invalidation info */
u32 *iommu_state; /* Store iommu states between suspend and resume.*/ u32 *iommu_state; /* Store iommu states between suspend and resume.*/
#ifdef CONFIG_INTR_REMAP #ifdef CONFIG_IRQ_REMAP
struct ir_table *ir_table; /* Interrupt remapping info */ struct ir_table *ir_table; /* Interrupt remapping info */
#endif #endif
int node; int node;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment