···148148149149endmenu150150151151-config MSM_IOMMU152152- bool "MSM IOMMU Support"153153- depends on ARCH_MSM8X60 || ARCH_MSM8960154154- select IOMMU_API155155- default n156156- help157157- Support for the IOMMUs found on certain Qualcomm SOCs.158158- These IOMMUs allow virtualization of the address space used by most159159- cores within the multimedia subsystem.160160-161161- If unsure, say N here.162162-163163-config IOMMU_PGTABLES_L2164164- def_bool y165165- depends on MSM_IOMMU && MMU && SMP && CPU_DCACHE_DISABLE=n166166-167151config MSM_DEBUG_UART168152 int169153 default 1 if MSM_DEBUG_UART1···187203 bool188204189205config MSM_V2_TLMM190190- bool191191-192192-config IOMMU_API193206 bool194207195208config MSM_SCM
···627627628628source "drivers/pcmcia/Kconfig"629629630630-config DMAR631631- bool "Support for DMA Remapping Devices (EXPERIMENTAL)"632632- depends on IA64_GENERIC && ACPI && EXPERIMENTAL633633- help634634- DMA remapping (DMAR) devices support enables independent address635635- translations for Direct Memory Access (DMA) from devices.636636- These DMA remapping devices are reported via ACPI tables637637- and include PCI device scope covered by these DMA638638- remapping devices.639639-640640-config DMAR_DEFAULT_ON641641- def_bool y642642- prompt "Enable DMA Remapping Devices by default"643643- depends on DMAR644644- help645645- Selecting this option will enable a DMAR device at boot time if646646- one is found. If this option is not selected, DMAR support can647647- be enabled by passing intel_iommu=on to the kernel. It is648648- recommended you say N here while the DMAR code remains649649- experimental.650650-651630endmenu652631653632endif···660681661682config IOMMU_HELPER662683 def_bool (IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB || IA64_GENERIC || SWIOTLB)663663-664664-config IOMMU_API665665- def_bool (DMAR)
-79
arch/x86/Kconfig
···680680 Calgary anyway, pass 'iommu=calgary' on the kernel command line.681681 If unsure, say Y.682682683683-config AMD_IOMMU684684- bool "AMD IOMMU support"685685- select SWIOTLB686686- select PCI_MSI687687- select PCI_IOV688688- depends on X86_64 && PCI && ACPI689689- ---help---690690- With this option you can enable support for AMD IOMMU hardware in691691- your system. An IOMMU is a hardware component which provides692692- remapping of DMA memory accesses from devices. With an AMD IOMMU you693693- can isolate the the DMA memory of different devices and protect the694694- system from misbehaving device drivers or hardware.695695-696696- You can find out if your system has an AMD IOMMU if you look into697697- your BIOS for an option to enable it or if you have an IVRS ACPI698698- table.699699-700700-config AMD_IOMMU_STATS701701- bool "Export AMD IOMMU statistics to debugfs"702702- depends on AMD_IOMMU703703- select DEBUG_FS704704- ---help---705705- This option enables code in the AMD IOMMU driver to collect various706706- statistics about whats happening in the driver and exports that707707- information to userspace via debugfs.708708- If unsure, say N.709709-710683# need this always selected by IOMMU for the VIA workaround711684config SWIOTLB712685 def_bool y if X86_64···692719693720config IOMMU_HELPER694721 def_bool (CALGARY_IOMMU || GART_IOMMU || SWIOTLB || AMD_IOMMU)695695-696696-config IOMMU_API697697- def_bool (AMD_IOMMU || DMAR)698722699723config MAXSMP700724 bool "Enable Maximum number of SMP Processors and NUMA Nodes"···19111941 is known to be incomplete.1912194219131943 You should say N unless you know you need this.19141914-19151915-config DMAR19161916- bool "Support for DMA Remapping Devices (EXPERIMENTAL)"19171917- depends on PCI_MSI && ACPI && EXPERIMENTAL19181918- help19191919- DMA remapping (DMAR) devices support enables independent address19201920- translations for Direct Memory Access (DMA) from devices.19211921- These DMA remapping devices are reported via ACPI tables19221922- and include PCI device scope covered by these DMA19231923- remapping devices.19241924-19251925-config DMAR_DEFAULT_ON19261926- def_bool y19271927- prompt "Enable DMA Remapping Devices by default"19281928- depends on DMAR19291929- help19301930- Selecting this option will enable a DMAR device at boot time if19311931- one is found. If this option is not selected, DMAR support can19321932- be enabled by passing intel_iommu=on to the kernel. It is19331933- recommended you say N here while the DMAR code remains19341934- experimental.19351935-19361936-config DMAR_BROKEN_GFX_WA19371937- bool "Workaround broken graphics drivers (going away soon)"19381938- depends on DMAR && BROKEN19391939- ---help---19401940- Current Graphics drivers tend to use physical address19411941- for DMA and avoid using DMA APIs. Setting this config19421942- option permits the IOMMU driver to set a unity map for19431943- all the OS-visible memory. Hence the driver can continue19441944- to use physical addresses for DMA, at least until this19451945- option is removed in the 2.6.32 kernel.19461946-19471947-config DMAR_FLOPPY_WA19481948- def_bool y19491949- depends on DMAR19501950- ---help---19511951- Floppy disk drivers are known to bypass DMA API calls19521952- thereby failing to work when IOMMU is enabled. This19531953- workaround will setup a 1:1 mapping for the first19541954- 16MiB to make floppy (an ISA device) work.19551955-19561956-config INTR_REMAP19571957- bool "Support for Interrupt Remapping (EXPERIMENTAL)"19581958- depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI && EXPERIMENTAL19591959- ---help---19601960- Supports Interrupt remapping for IO-APIC and MSI devices.19611961- To use x2apic mode in the CPU's which support x2APIC enhancements or19621962- to support platforms with CPU's having > 8 bit APIC ID, say Y.1963194419641945source "drivers/pci/pcie/Kconfig"19651946
···1919#ifndef _ASM_X86_AMD_IOMMU_PROTO_H2020#define _ASM_X86_AMD_IOMMU_PROTO_H21212222-#include <asm/amd_iommu_types.h>2222+#include "amd_iommu_types.h"23232424extern int amd_iommu_init_dma_ops(void);2525extern int amd_iommu_init_passthrough(void);
···11+# IOMMU_API always gets selected by whoever wants it.22+config IOMMU_API33+ bool44+55+menuconfig IOMMU_SUPPORT66+ bool "IOMMU Hardware Support"77+ default y88+ ---help---99+ Say Y here if you want to compile device drivers for IO Memory1010+ Management Units into the kernel. These devices usually allow to1111+ remap DMA requests and/or remap interrupts from other devices on the1212+ system.1313+1414+if IOMMU_SUPPORT1515+1616+# MSM IOMMU support1717+config MSM_IOMMU1818+ bool "MSM IOMMU Support"1919+ depends on ARCH_MSM8X60 || ARCH_MSM89602020+ select IOMMU_API2121+ help2222+ Support for the IOMMUs found on certain Qualcomm SOCs.2323+ These IOMMUs allow virtualization of the address space used by most2424+ cores within the multimedia subsystem.2525+2626+ If unsure, say N here.2727+2828+config IOMMU_PGTABLES_L22929+ def_bool y3030+ depends on MSM_IOMMU && MMU && SMP && CPU_DCACHE_DISABLE=n3131+3232+# AMD IOMMU support3333+config AMD_IOMMU3434+ bool "AMD IOMMU support"3535+ select SWIOTLB3636+ select PCI_MSI3737+ select PCI_IOV3838+ select IOMMU_API3939+ depends on X86_64 && PCI && ACPI4040+ ---help---4141+ With this option you can enable support for AMD IOMMU hardware in4242+ your system. An IOMMU is a hardware component which provides4343+ remapping of DMA memory accesses from devices. With an AMD IOMMU you4444+ can isolate the the DMA memory of different devices and protect the4545+ system from misbehaving device drivers or hardware.4646+4747+ You can find out if your system has an AMD IOMMU if you look into4848+ your BIOS for an option to enable it or if you have an IVRS ACPI4949+ table.5050+5151+config AMD_IOMMU_STATS5252+ bool "Export AMD IOMMU statistics to debugfs"5353+ depends on AMD_IOMMU5454+ select DEBUG_FS5555+ ---help---5656+ This option enables code in the AMD IOMMU driver to collect various5757+ statistics about whats happening in the driver and exports that5858+ information to userspace via debugfs.5959+ If unsure, say N.6060+6161+# Intel IOMMU support6262+config DMAR6363+ bool "Support for DMA Remapping Devices"6464+ depends on PCI_MSI && ACPI && (X86 || IA64_GENERIC)6565+ select IOMMU_API6666+ help6767+ DMA remapping (DMAR) devices support enables independent address6868+ translations for Direct Memory Access (DMA) from devices.6969+ These DMA remapping devices are reported via ACPI tables7070+ and include PCI device scope covered by these DMA7171+ remapping devices.7272+7373+config DMAR_DEFAULT_ON7474+ def_bool y7575+ prompt "Enable DMA Remapping Devices by default"7676+ depends on DMAR7777+ help7878+ Selecting this option will enable a DMAR device at boot time if7979+ one is found. If this option is not selected, DMAR support can8080+ be enabled by passing intel_iommu=on to the kernel.8181+8282+config DMAR_BROKEN_GFX_WA8383+ bool "Workaround broken graphics drivers (going away soon)"8484+ depends on DMAR && BROKEN && X868585+ ---help---8686+ Current Graphics drivers tend to use physical address8787+ for DMA and avoid using DMA APIs. Setting this config8888+ option permits the IOMMU driver to set a unity map for8989+ all the OS-visible memory. Hence the driver can continue9090+ to use physical addresses for DMA, at least until this9191+ option is removed in the 2.6.32 kernel.9292+9393+config DMAR_FLOPPY_WA9494+ def_bool y9595+ depends on DMAR && X869696+ ---help---9797+ Floppy disk drivers are known to bypass DMA API calls9898+ thereby failing to work when IOMMU is enabled. This9999+ workaround will setup a 1:1 mapping for the first100100+ 16MiB to make floppy (an ISA device) work.101101+102102+config INTR_REMAP103103+ bool "Support for Interrupt Remapping (EXPERIMENTAL)"104104+ depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI && EXPERIMENTAL105105+ ---help---106106+ Supports Interrupt remapping for IO-APIC and MSI devices.107107+ To use x2apic mode in the CPU's which support x2APIC enhancements or108108+ to support platforms with CPU's having > 8 bit APIC ID, say Y.109109+110110+endif # IOMMU_SUPPORT
···15891589int pci_vpd_find_info_keyword(const u8 *buf, unsigned int off,15901590 unsigned int len, const char *kw);1591159115921592+/**15931593+ * pci_find_upstream_pcie_bridge - find upstream PCIe-to-PCI bridge of a device15941594+ * @pdev: the PCI device15951595+ *15961596+ * if the device is PCIE, return NULL15971597+ * if the device isn't connected to a PCIe bridge (that is its parent is a15981598+ * legacy PCI bridge and the bridge is directly connected to bus 0), return its15991599+ * parent16001600+ */16011601+struct pci_dev *pci_find_upstream_pcie_bridge(struct pci_dev *pdev);16021602+15921603#endif /* __KERNEL__ */15931604#endif /* LINUX_PCI_H */