diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2016-10-05 15:00:21 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-10-05 15:00:21 -0400 |
commit | bdf530984d10b6b88b10a6d03057409a3f1c6897 (patch) | |
tree | 9ae670861f37cd57c21d92bf6fb1b50c4cacd2f6 /Documentation | |
parent | 69a06e49843b29b296689fa2a7fc320d81aa7c64 (diff) | |
parent | 181ffd19cc9898f795646bf9a897072a419a51ed (diff) |
Merge branch 'pci/host-vmd' into next
* pci/host-vmd:
x86/PCI: VMD: Move VMD driver to drivers/pci/host
x86/PCI: VMD: Synchronize with RCU freeing MSI IRQ descs
x86/PCI: VMD: Eliminate index member from IRQ list
x86/PCI: VMD: Eliminate vmd_vector member from list type
x86/PCI: VMD: Convert to use pci_alloc_irq_vectors() API
x86/PCI: VMD: Allocate IRQ lists with correct MSI-X count
PCI: Use positive flags in pci_alloc_irq_vectors()
PCI: Update "pci=resource_alignment" documentation
Conflicts:
drivers/pci/host/Kconfig
drivers/pci/host/Makefile
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/PCI/MSI-HOWTO.txt | 24 | ||||
-rw-r--r-- | Documentation/kernel-parameters.txt | 4 |
2 files changed, 14 insertions, 14 deletions
diff --git a/Documentation/PCI/MSI-HOWTO.txt b/Documentation/PCI/MSI-HOWTO.txt index c55df2911136..cd9c9f6a7cd9 100644 --- a/Documentation/PCI/MSI-HOWTO.txt +++ b/Documentation/PCI/MSI-HOWTO.txt | |||
@@ -94,14 +94,11 @@ has a requirements for a minimum number of vectors the driver can pass a | |||
94 | min_vecs argument set to this limit, and the PCI core will return -ENOSPC | 94 | min_vecs argument set to this limit, and the PCI core will return -ENOSPC |
95 | if it can't meet the minimum number of vectors. | 95 | if it can't meet the minimum number of vectors. |
96 | 96 | ||
97 | The flags argument should normally be set to 0, but can be used to pass the | 97 | The flags argument is used to specify which type of interrupt can be used |
98 | PCI_IRQ_NOMSI and PCI_IRQ_NOMSIX flag in case a device claims to support | 98 | by the device and the driver (PCI_IRQ_LEGACY, PCI_IRQ_MSI, PCI_IRQ_MSIX). |
99 | MSI or MSI-X, but the support is broken, or to pass PCI_IRQ_NOLEGACY in | 99 | A convenient short-hand (PCI_IRQ_ALL_TYPES) is also available to ask for |
100 | case the device does not support legacy interrupt lines. | 100 | any possible kind of interrupt. If the PCI_IRQ_AFFINITY flag is set, |
101 | 101 | pci_alloc_irq_vectors() will spread the interrupts around the available CPUs. | |
102 | By default this function will spread the interrupts around the available | ||
103 | CPUs, but this feature can be disabled by passing the PCI_IRQ_NOAFFINITY | ||
104 | flag. | ||
105 | 102 | ||
106 | To get the Linux IRQ numbers passed to request_irq() and free_irq() and the | 103 | To get the Linux IRQ numbers passed to request_irq() and free_irq() and the |
107 | vectors, use the following function: | 104 | vectors, use the following function: |
@@ -131,7 +128,7 @@ larger than the number supported by the device it will automatically be | |||
131 | capped to the supported limit, so there is no need to query the number of | 128 | capped to the supported limit, so there is no need to query the number of |
132 | vectors supported beforehand: | 129 | vectors supported beforehand: |
133 | 130 | ||
134 | nvec = pci_alloc_irq_vectors(pdev, 1, nvec, 0); | 131 | nvec = pci_alloc_irq_vectors(pdev, 1, nvec, PCI_IRQ_ALL_TYPES) |
135 | if (nvec < 0) | 132 | if (nvec < 0) |
136 | goto out_err; | 133 | goto out_err; |
137 | 134 | ||
@@ -140,7 +137,7 @@ interrupts it can request a particular number of interrupts by passing that | |||
140 | number to pci_alloc_irq_vectors() function as both 'min_vecs' and | 137 | number to pci_alloc_irq_vectors() function as both 'min_vecs' and |
141 | 'max_vecs' parameters: | 138 | 'max_vecs' parameters: |
142 | 139 | ||
143 | ret = pci_alloc_irq_vectors(pdev, nvec, nvec, 0); | 140 | ret = pci_alloc_irq_vectors(pdev, nvec, nvec, PCI_IRQ_ALL_TYPES); |
144 | if (ret < 0) | 141 | if (ret < 0) |
145 | goto out_err; | 142 | goto out_err; |
146 | 143 | ||
@@ -148,15 +145,14 @@ The most notorious example of the request type described above is enabling | |||
148 | the single MSI mode for a device. It could be done by passing two 1s as | 145 | the single MSI mode for a device. It could be done by passing two 1s as |
149 | 'min_vecs' and 'max_vecs': | 146 | 'min_vecs' and 'max_vecs': |
150 | 147 | ||
151 | ret = pci_alloc_irq_vectors(pdev, 1, 1, 0); | 148 | ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES); |
152 | if (ret < 0) | 149 | if (ret < 0) |
153 | goto out_err; | 150 | goto out_err; |
154 | 151 | ||
155 | Some devices might not support using legacy line interrupts, in which case | 152 | Some devices might not support using legacy line interrupts, in which case |
156 | the PCI_IRQ_NOLEGACY flag can be used to fail the request if the platform | 153 | the driver can specify that only MSI or MSI-X is acceptable: |
157 | can't provide MSI or MSI-X interrupts: | ||
158 | 154 | ||
159 | nvec = pci_alloc_irq_vectors(pdev, 1, nvec, PCI_IRQ_NOLEGACY); | 155 | nvec = pci_alloc_irq_vectors(pdev, 1, nvec, PCI_IRQ_MSI | PCI_IRQ_MSIX); |
160 | if (nvec < 0) | 156 | if (nvec < 0) |
161 | goto out_err; | 157 | goto out_err; |
162 | 158 | ||
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 46c030a49186..a4f4d693e2c1 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -3032,6 +3032,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
3032 | PAGE_SIZE is used as alignment. | 3032 | PAGE_SIZE is used as alignment. |
3033 | PCI-PCI bridge can be specified, if resource | 3033 | PCI-PCI bridge can be specified, if resource |
3034 | windows need to be expanded. | 3034 | windows need to be expanded. |
3035 | To specify the alignment for several | ||
3036 | instances of a device, the PCI vendor, | ||
3037 | device, subvendor, and subdevice may be | ||
3038 | specified, e.g., 4096@pci:8086:9c22:103c:198f | ||
3035 | ecrc= Enable/disable PCIe ECRC (transaction layer | 3039 | ecrc= Enable/disable PCIe ECRC (transaction layer |
3036 | end-to-end CRC checking). | 3040 | end-to-end CRC checking). |
3037 | bios: Use BIOS/firmware settings. This is the | 3041 | bios: Use BIOS/firmware settings. This is the |