Commit 62fdd767 authored by Fenghua Yu's avatar Fenghua Yu Committed by Tony Luck
Browse files

[IA64] Add Variable Page Size and IA64 Support in Intel IOMMU



The patch contains Intel IOMMU IA64 specific code. It defines new
machvec dig_vtd, hooks for IOMMU, DMAR table detection, cache line flush
function, etc.

For a generic kernel with CONFIG_DMAR=y, if Intel IOMMU is detected,
dig_vtd is used for machinve vector. Otherwise, kernel falls back to
dig machine vector. Kernel parameter "machvec=dig" or "intel_iommu=off"
can be used to force kernel to boot dig machine vector.

Signed-off-by: default avatarFenghua Yu <fenghua.yu@intel.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 6bb7a935
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -117,6 +117,7 @@ config IA64_GENERIC
	select NUMA
	select ACPI_NUMA
	select SWIOTLB
	select PCI_MSI
	help
	  This selects the system type of your hardware.  A "generic" kernel
	  will run on any supported IA-64 system.  However, if you configure
@@ -124,6 +125,7 @@ config IA64_GENERIC

	  generic		For any supported IA-64 system
	  DIG-compliant		For DIG ("Developer's Interface Guide") compliant systems
	  DIG+Intel+IOMMU	For DIG systems with Intel IOMMU
	  HP-zx1/sx1000		For HP systems
	  HP-zx1/sx1000+swiotlb	For HP systems with (broken) DMA-constrained devices.
	  SGI-SN2		For SGI Altix systems
@@ -136,6 +138,11 @@ config IA64_DIG
	bool "DIG-compliant"
	select SWIOTLB

config IA64_DIG_VTD
	bool "DIG+Intel+IOMMU"
	select DMAR
	select PCI_MSI

config IA64_HP_ZX1
	bool "HP-zx1/sx1000"
	help
@@ -581,6 +588,16 @@ source "drivers/pci/hotplug/Kconfig"

source "drivers/pcmcia/Kconfig"

config DMAR
        bool "Support for DMA Remapping Devices (EXPERIMENTAL)"
        depends on IA64_GENERIC && ACPI && EXPERIMENTAL
	help
	  DMA remapping (DMAR) devices support enables independent address
	  translations for Direct Memory Access (DMA) from devices.
	  These DMA remapping devices are reported via ACPI tables
	  and include PCI device scope covered by these DMA
	  remapping devices.

endmenu

endif
+1 −0
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ libs-y += arch/ia64/lib/
core-y				+= arch/ia64/kernel/ arch/ia64/mm/
core-$(CONFIG_IA32_SUPPORT)	+= arch/ia64/ia32/
core-$(CONFIG_IA64_DIG) 	+= arch/ia64/dig/
core-$(CONFIG_IA64_DIG_VTD) 	+= arch/ia64/dig/
core-$(CONFIG_IA64_GENERIC) 	+= arch/ia64/dig/
core-$(CONFIG_IA64_HP_ZX1)	+= arch/ia64/dig/
core-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/dig/
+2 −0
Original line number Diff line number Diff line
@@ -233,6 +233,8 @@ CONFIG_DMIID=y
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_MISC=m

# CONFIG_DMAR is not set

#
# Power management and ACPI
#
+2 −0
Original line number Diff line number Diff line
@@ -172,6 +172,8 @@ CONFIG_DMIID=y
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_MISC=m

# CONFIG_DMAR is not set

#
# Power management and ACPI
#
+5 −0
Original line number Diff line number Diff line
@@ -6,4 +6,9 @@
#

obj-y := setup.o
ifeq ($(CONFIG_DMAR), y)
obj-$(CONFIG_IA64_GENERIC) += machvec.o machvec_vtd.o dig_vtd_iommu.o
else
obj-$(CONFIG_IA64_GENERIC) += machvec.o
endif
obj-$(CONFIG_IA64_DIG_VTD) += dig_vtd_iommu.o
Loading