Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86: amd_iommu: move to drivers/iommu/

This should ease finding similarities with different platforms,
with the intention of solving problems once in a generic framework
which everyone can use.

Compile-tested on x86_64.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>

authored by

Ohad Ben-Cohen and committed by
Joerg Roedel
29b68415 b10f127e

+31 -29
-28
arch/x86/Kconfig
··· 680 680 Calgary anyway, pass 'iommu=calgary' on the kernel command line. 681 681 If unsure, say Y. 682 682 683 - config AMD_IOMMU 684 - bool "AMD IOMMU support" 685 - select SWIOTLB 686 - select PCI_MSI 687 - select PCI_IOV 688 - select IOMMU_API 689 - depends on X86_64 && PCI && ACPI 690 - ---help--- 691 - With this option you can enable support for AMD IOMMU hardware in 692 - your system. An IOMMU is a hardware component which provides 693 - remapping of DMA memory accesses from devices. With an AMD IOMMU you 694 - can isolate the the DMA memory of different devices and protect the 695 - system from misbehaving device drivers or hardware. 696 - 697 - You can find out if your system has an AMD IOMMU if you look into 698 - your BIOS for an option to enable it or if you have an IVRS ACPI 699 - table. 700 - 701 - config AMD_IOMMU_STATS 702 - bool "Export AMD IOMMU statistics to debugfs" 703 - depends on AMD_IOMMU 704 - select DEBUG_FS 705 - ---help--- 706 - This option enables code in the AMD IOMMU driver to collect various 707 - statistics about whats happening in the driver and exports that 708 - information to userspace via debugfs. 709 - If unsure, say N. 710 - 711 683 # need this always selected by IOMMU for the VIA workaround 712 684 config SWIOTLB 713 685 def_bool y if X86_64
+1 -1
arch/x86/kernel/Makefile
··· 123 123 124 124 obj-$(CONFIG_GART_IOMMU) += amd_gart_64.o aperture_64.o 125 125 obj-$(CONFIG_CALGARY_IOMMU) += pci-calgary_64.o tce_64.o 126 - obj-$(CONFIG_AMD_IOMMU) += amd_iommu_init.o amd_iommu.o 126 + obj-$(CONFIG_AMD_IOMMU) += amd_iommu_init.o 127 127 128 128 obj-$(CONFIG_PCI_MMCONFIG) += mmconf-fam10h_64.o 129 129 obj-y += vsmp_64.o
arch/x86/kernel/amd_iommu.c drivers/iommu/amd_iommu.c
+29
drivers/iommu/Kconfig
··· 17 17 config IOMMU_PGTABLES_L2 18 18 def_bool y 19 19 depends on MSM_IOMMU && MMU && SMP && CPU_DCACHE_DISABLE=n 20 + 21 + # AMD IOMMU support 22 + config AMD_IOMMU 23 + bool "AMD IOMMU support" 24 + select SWIOTLB 25 + select PCI_MSI 26 + select PCI_IOV 27 + select IOMMU_API 28 + depends on X86_64 && PCI && ACPI 29 + ---help--- 30 + With this option you can enable support for AMD IOMMU hardware in 31 + your system. An IOMMU is a hardware component which provides 32 + remapping of DMA memory accesses from devices. With an AMD IOMMU you 33 + can isolate the the DMA memory of different devices and protect the 34 + system from misbehaving device drivers or hardware. 35 + 36 + You can find out if your system has an AMD IOMMU if you look into 37 + your BIOS for an option to enable it or if you have an IVRS ACPI 38 + table. 39 + 40 + config AMD_IOMMU_STATS 41 + bool "Export AMD IOMMU statistics to debugfs" 42 + depends on AMD_IOMMU 43 + select DEBUG_FS 44 + ---help--- 45 + This option enables code in the AMD IOMMU driver to collect various 46 + statistics about whats happening in the driver and exports that 47 + information to userspace via debugfs. 48 + If unsure, say N.
+1
drivers/iommu/Makefile
··· 1 1 obj-$(CONFIG_IOMMU_API) += iommu.o 2 2 obj-$(CONFIG_MSM_IOMMU) += msm_iommu.o msm_iommu_dev.o 3 + obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o