diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-23 16:41:24 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-23 16:41:24 -0400 |
| commit | d8133356e99713bd023b229de107ddd6dd6d375a (patch) | |
| tree | 3155424b58daff2190ab7aff75ba6204aef692a3 | |
| parent | 234a56c80a6aa7a05fec05d8b7184354d8765b48 (diff) | |
| parent | 207b074f82c6790f008bfe055c37b47047eb2122 (diff) | |
Merge tag 'pci-v4.2-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI updates from Bjorn Helgaas:
"PCI changes for the v4.2 merge window:
Enumeration
- Move pci_ari_enabled() to global header (Alex Williamson)
- Account for ARI in _PRT lookups (Alex Williamson)
- Remove unused pci_scan_bus_parented() (Yijing Wang)
Resource management
- Use host bridge _CRS info on systems with >32 bit addressing (Bjorn Helgaas)
- Use host bridge _CRS info on Foxconn K8M890-8237A (Bjorn Helgaas)
- Fix pci_address_to_pio() conversion of CPU address to I/O port (Zhichang Yuan)
- Add pci_bus_addr_t (Yinghai Lu)
PCI device hotplug
- Wait for pciehp command completion where necessary (Alex Williamson)
- Drop pointless ACPI-based "slot detection" check (Rafael J. Wysocki)
- Check ignore_hotplug for all downstream devices (Rafael J. Wysocki)
- Propagate the "ignore hotplug" setting to parent (Rafael J. Wysocki)
- Inline pciehp "handle event" functions into the ISR (Bjorn Helgaas)
- Clean up pciehp debug logging (Bjorn Helgaas)
Power management
- Remove redundant PCIe port type checking (Yijing Wang)
- Add dev->has_secondary_link to track downstream PCIe links (Yijing Wang)
- Use dev->has_secondary_link to find downstream links for ASPM (Yijing Wang)
- Drop __pci_disable_link_state() useless "force" parameter (Bjorn Helgaas)
- Simplify Clock Power Management setting (Bjorn Helgaas)
Virtualization
- Add ACS quirks for Intel 9-series PCH root ports (Alex Williamson)
- Add function 1 DMA alias quirk for Marvell 9120 (Sakari Ailus)
MSI
- Disable MSI at enumeration even if kernel doesn't support MSI (Michael S. Tsirkin)
- Remove unused pci_msi_off() (Bjorn Helgaas)
- Rename msi_set_enable(), msix_clear_and_set_ctrl() (Michael S. Tsirkin)
- Export pci_msi_set_enable(), pci_msix_clear_and_set_ctrl() (Michael S. Tsirkin)
- Drop pci_msi_off() calls during probe (Michael S. Tsirkin)
APM X-Gene host bridge driver
- Add APM X-Gene v1 PCIe MSI/MSIX termination driver (Duc Dang)
- Add APM X-Gene PCIe MSI DTS nodes (Duc Dang)
- Disable Configuration Request Retry Status for v1 silicon (Duc Dang)
- Allow config access to Root Port even when link is down (Duc Dang)
Broadcom iProc host bridge driver
- Allow override of device tree IRQ mapping function (Hauke Mehrtens)
- Add BCMA PCIe driver (Hauke Mehrtens)
- Directly add PCI resources (Hauke Mehrtens)
- Free resource list after registration (Hauke Mehrtens)
Freescale i.MX6 host bridge driver
- Add speed change timeout message (Troy Kisky)
- Rename imx6_pcie_start_link() to imx6_pcie_establish_link() (Bjorn Helgaas)
Freescale Layerscape host bridge driver
- Use dw_pcie_link_up() consistently (Bjorn Helgaas)
- Factor out ls_pcie_establish_link() (Bjorn Helgaas)
Marvell MVEBU host bridge driver
- Remove mvebu_pcie_scan_bus() (Yijing Wang)
NVIDIA Tegra host bridge driver
- Remove tegra_pcie_scan_bus() (Yijing Wang)
Synopsys DesignWare host bridge driver
- Consolidate outbound iATU programming functions (Jisheng Zhang)
- Use iATU0 for cfg and IO, iATU1 for MEM (Jisheng Zhang)
- Add support for x8 links (Zhou Wang)
- Wait for link to come up with consistent style (Bjorn Helgaas)
- Use pci_scan_root_bus() for simplicity (Yijing Wang)
TI DRA7xx host bridge driver
- Use dw_pcie_link_up() consistently (Bjorn Helgaas)
Miscellaneous
- Include <linux/pci.h>, not <asm/pci.h> (Bjorn Helgaas)
- Remove unnecessary #includes of <asm/pci.h> (Bjorn Helgaas)
- Remove unused pcibios_select_root() (again) (Bjorn Helgaas)
- Remove unused pci_dma_burst_advice() (Bjorn Helgaas)
- xen/pcifront: Don't use deprecated function pci_scan_bus_parented() (Arnd Bergmann)"
* tag 'pci-v4.2-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (58 commits)
PCI: pciehp: Inline the "handle event" functions into the ISR
PCI: pciehp: Rename queue_interrupt_event() to pciehp_queue_interrupt_event()
PCI: pciehp: Make queue_interrupt_event() void
PCI: xgene: Allow config access to Root Port even when link is down
PCI: xgene: Disable Configuration Request Retry Status for v1 silicon
PCI: pciehp: Clean up debug logging
x86/PCI: Use host bridge _CRS info on systems with >32 bit addressing
PCI: imx6: Add #define PCIE_RC_LCSR
PCI: imx6: Use "u32", not "uint32_t"
PCI: Remove unused pci_scan_bus_parented()
xen/pcifront: Don't use deprecated function pci_scan_bus_parented()
PCI: imx6: Add speed change timeout message
PCI/ASPM: Simplify Clock Power Management setting
PCI: designware: Wait for link to come up with consistent style
PCI: layerscape: Factor out ls_pcie_establish_link()
PCI: layerscape: Use dw_pcie_link_up() consistently
PCI: dra7xx: Use dw_pcie_link_up() consistently
x86/PCI: Use host bridge _CRS info on Foxconn K8M890-8237A
PCI: pciehp: Wait for hotplug command completion where necessary
PCI: Remove unused pci_dma_burst_advice()
...
76 files changed, 1396 insertions, 1125 deletions
diff --git a/Documentation/DMA-API-HOWTO.txt b/Documentation/DMA-API-HOWTO.txt index 0f7afb2bb442..aef8cc5a677b 100644 --- a/Documentation/DMA-API-HOWTO.txt +++ b/Documentation/DMA-API-HOWTO.txt | |||
| @@ -25,13 +25,18 @@ physical addresses. These are the addresses in /proc/iomem. The physical | |||
| 25 | address is not directly useful to a driver; it must use ioremap() to map | 25 | address is not directly useful to a driver; it must use ioremap() to map |
| 26 | the space and produce a virtual address. | 26 | the space and produce a virtual address. |
| 27 | 27 | ||
| 28 | I/O devices use a third kind of address: a "bus address" or "DMA address". | 28 | I/O devices use a third kind of address: a "bus address". If a device has |
| 29 | If a device has registers at an MMIO address, or if it performs DMA to read | 29 | registers at an MMIO address, or if it performs DMA to read or write system |
| 30 | or write system memory, the addresses used by the device are bus addresses. | 30 | memory, the addresses used by the device are bus addresses. In some |
| 31 | In some systems, bus addresses are identical to CPU physical addresses, but | 31 | systems, bus addresses are identical to CPU physical addresses, but in |
| 32 | in general they are not. IOMMUs and host bridges can produce arbitrary | 32 | general they are not. IOMMUs and host bridges can produce arbitrary |
| 33 | mappings between physical and bus addresses. | 33 | mappings between physical and bus addresses. |
| 34 | 34 | ||
| 35 | From a device's point of view, DMA uses the bus address space, but it may | ||
| 36 | be restricted to a subset of that space. For example, even if a system | ||
| 37 | supports 64-bit addresses for main memory and PCI BARs, it may use an IOMMU | ||
| 38 | so devices only need to use 32-bit DMA addresses. | ||
| 39 | |||
| 35 | Here's a picture and some examples: | 40 | Here's a picture and some examples: |
| 36 | 41 | ||
| 37 | CPU CPU Bus | 42 | CPU CPU Bus |
| @@ -72,11 +77,11 @@ can use virtual address X to access the buffer, but the device itself | |||
| 72 | cannot because DMA doesn't go through the CPU virtual memory system. | 77 | cannot because DMA doesn't go through the CPU virtual memory system. |
| 73 | 78 | ||
| 74 | In some simple systems, the device can do DMA directly to physical address | 79 | In some simple systems, the device can do DMA directly to physical address |
| 75 | Y. But in many others, there is IOMMU hardware that translates bus | 80 | Y. But in many others, there is IOMMU hardware that translates DMA |
| 76 | addresses to physical addresses, e.g., it translates Z to Y. This is part | 81 | addresses to physical addresses, e.g., it translates Z to Y. This is part |
| 77 | of the reason for the DMA API: the driver can give a virtual address X to | 82 | of the reason for the DMA API: the driver can give a virtual address X to |
| 78 | an interface like dma_map_single(), which sets up any required IOMMU | 83 | an interface like dma_map_single(), which sets up any required IOMMU |
| 79 | mapping and returns the bus address Z. The driver then tells the device to | 84 | mapping and returns the DMA address Z. The driver then tells the device to |
| 80 | do DMA to Z, and the IOMMU maps it to the buffer at address Y in system | 85 | do DMA to Z, and the IOMMU maps it to the buffer at address Y in system |
| 81 | RAM. | 86 | RAM. |
| 82 | 87 | ||
| @@ -98,7 +103,7 @@ First of all, you should make sure | |||
| 98 | #include <linux/dma-mapping.h> | 103 | #include <linux/dma-mapping.h> |
| 99 | 104 | ||
| 100 | is in your driver, which provides the definition of dma_addr_t. This type | 105 | is in your driver, which provides the definition of dma_addr_t. This type |
| 101 | can hold any valid DMA or bus address for the platform and should be used | 106 | can hold any valid DMA address for the platform and should be used |
| 102 | everywhere you hold a DMA address returned from the DMA mapping functions. | 107 | everywhere you hold a DMA address returned from the DMA mapping functions. |
| 103 | 108 | ||
| 104 | What memory is DMA'able? | 109 | What memory is DMA'able? |
| @@ -316,7 +321,7 @@ There are two types of DMA mappings: | |||
| 316 | Think of "consistent" as "synchronous" or "coherent". | 321 | Think of "consistent" as "synchronous" or "coherent". |
| 317 | 322 | ||
| 318 | The current default is to return consistent memory in the low 32 | 323 | The current default is to return consistent memory in the low 32 |
| 319 | bits of the bus space. However, for future compatibility you should | 324 | bits of the DMA space. However, for future compatibility you should |
| 320 | |||
