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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'pci-v5.0-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

Pull PCI fixes from Bjorn Helgaas::

- Fix PCI kconfig menu organization (Rob Herring)

- Fix pci_alloc_irq_vectors_affinity() error return to allow "reduce
and retry" for drivers using IRQ sets (Ming Lei)

- Fix "pci=disable_acs_redir" initdata use-after-free problem (Logan
Gunthorpe)

* tag 'pci-v5.0-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
PCI: Fix __initdata issue with "pci=disable_acs_redir" parameter
PCI/MSI: Return -ENOSPC from pci_alloc_irq_vectors_affinity()
PCI: Fix PCI kconfig menu organization

+23 -24
+8 -14
drivers/pci/Kconfig
··· 21 21 support for PCI-X and the foundations for PCI Express support. 22 22 Say 'Y' here unless you know what you are doing. 23 23 24 + if PCI 25 + 24 26 config PCI_DOMAINS 25 27 bool 26 28 depends on PCI 27 29 28 30 config PCI_DOMAINS_GENERIC 29 31 bool 30 - depends on PCI 31 32 select PCI_DOMAINS 32 33 33 34 config PCI_SYSCALL ··· 38 37 39 38 config PCI_MSI 40 39 bool "Message Signaled Interrupts (MSI and MSI-X)" 41 - depends on PCI 42 40 select GENERIC_MSI_IRQ 43 41 help 44 42 This allows device drivers to enable MSI (Message Signaled ··· 59 59 config PCI_QUIRKS 60 60 default y 61 61 bool "Enable PCI quirk workarounds" if EXPERT 62 - depends on PCI 63 62 help 64 63 This enables workarounds for various PCI chipset bugs/quirks. 65 64 Disable this only if your target machine is unaffected by PCI ··· 66 67 67 68 config PCI_DEBUG 68 69 bool "PCI Debugging" 69 - depends on PCI && DEBUG_KERNEL 70 + depends on DEBUG_KERNEL 70 71 help 71 72 Say Y here if you want the PCI core to produce a bunch of debug 72 73 messages to the system log. Select this if you are having a ··· 76 77 77 78 config PCI_REALLOC_ENABLE_AUTO 78 79 bool "Enable PCI resource re-allocation detection" 79 - depends on PCI 80 80 depends on PCI_IOV 81 81 help 82 82 Say Y here if you want the PCI core to detect if PCI resource ··· 88 90 89 91 config PCI_STUB 90 92 tristate "PCI Stub driver" 91 - depends on PCI 92 93 help 93 94 Say Y or M here if you want be able to reserve a PCI device 94 95 when it is going to be assigned to a guest operating system. ··· 96 99 97 100 config PCI_PF_STUB 98 101 tristate "PCI PF Stub driver" 99 - depends on PCI 100 102 depends on PCI_IOV 101 103 help 102 104 Say Y or M here if you want to enable support for devices that ··· 107 111 108 112 config XEN_PCIDEV_FRONTEND 109 113 tristate "Xen PCI Frontend" 110 - depends on PCI && X86 && XEN 114 + depends on X86 && XEN 111 115 select PCI_XEN 112 116 select XEN_XENBUS_FRONTEND 113 117 default y ··· 129 133 130 134 config PCI_IOV 131 135 bool "PCI IOV support" 132 - depends on PCI 133 136 select PCI_ATS 134 137 help 135 138 I/O Virtualization is a PCI feature supported by some devices ··· 139 144 140 145 config PCI_PRI 141 146 bool "PCI PRI support" 142 - depends on PCI 143 147 select PCI_ATS 144 148 help 145 149 PRI is the PCI Page Request Interface. It allows PCI devices that are ··· 148 154 149 155 config PCI_PASID 150 156 bool "PCI PASID support" 151 - depends on PCI 152 157 select PCI_ATS 153 158 help 154 159 Process Address Space Identifiers (PASIDs) can be used by PCI devices ··· 160 167 161 168 config PCI_P2PDMA 162 169 bool "PCI peer-to-peer transfer support" 163 - depends on PCI && ZONE_DEVICE 170 + depends on ZONE_DEVICE 164 171 select GENERIC_ALLOCATOR 165 172 help 166 173 Enableѕ drivers to do PCI peer-to-peer transactions to and from ··· 177 184 178 185 config PCI_LABEL 179 186 def_bool y if (DMI || ACPI) 180 - depends on PCI 181 187 select NLS 182 188 183 189 config PCI_HYPERV 184 190 tristate "Hyper-V PCI Frontend" 185 - depends on PCI && X86 && HYPERV && PCI_MSI && PCI_MSI_IRQ_DOMAIN && X86_64 191 + depends on X86 && HYPERV && PCI_MSI && PCI_MSI_IRQ_DOMAIN && X86_64 186 192 help 187 193 The PCI device frontend driver allows the kernel to import arbitrary 188 194 PCI devices from a PCI backend to support PCI driver domains. ··· 190 198 source "drivers/pci/controller/Kconfig" 191 199 source "drivers/pci/endpoint/Kconfig" 192 200 source "drivers/pci/switch/Kconfig" 201 + 202 + endif
+13 -9
drivers/pci/msi.c
··· 1168 1168 const struct irq_affinity *affd) 1169 1169 { 1170 1170 static const struct irq_affinity msi_default_affd; 1171 - int vecs = -ENOSPC; 1171 + int msix_vecs = -ENOSPC; 1172 + int msi_vecs = -ENOSPC; 1172 1173 1173 1174 if (flags & PCI_IRQ_AFFINITY) { 1174 1175 if (!affd) ··· 1180 1179 } 1181 1180 1182 1181 if (flags & PCI_IRQ_MSIX) { 1183 - vecs = __pci_enable_msix_range(dev, NULL, min_vecs, max_vecs, 1184 - affd); 1185 - if (vecs > 0) 1186 - return vecs; 1182 + msix_vecs = __pci_enable_msix_range(dev, NULL, min_vecs, 1183 + max_vecs, affd); 1184 + if (msix_vecs > 0) 1185 + return msix_vecs; 1187 1186 } 1188 1187 1189 1188 if (flags & PCI_IRQ_MSI) { 1190 - vecs = __pci_enable_msi_range(dev, min_vecs, max_vecs, affd); 1191 - if (vecs > 0) 1192 - return vecs; 1189 + msi_vecs = __pci_enable_msi_range(dev, min_vecs, max_vecs, 1190 + affd); 1191 + if (msi_vecs > 0) 1192 + return msi_vecs; 1193 1193 } 1194 1194 1195 1195 /* use legacy irq if allowed */ ··· 1201 1199 } 1202 1200 } 1203 1201 1204 - return vecs; 1202 + if (msix_vecs == -ENOSPC) 1203 + return -ENOSPC; 1204 + return msi_vecs; 1205 1205 } 1206 1206 EXPORT_SYMBOL(pci_alloc_irq_vectors_affinity); 1207 1207
+2 -1
drivers/pci/pci.c
··· 6195 6195 } else if (!strncmp(str, "pcie_scan_all", 13)) { 6196 6196 pci_add_flags(PCI_SCAN_ALL_PCIE_DEVS); 6197 6197 } else if (!strncmp(str, "disable_acs_redir=", 18)) { 6198 - disable_acs_redir_param = str + 18; 6198 + disable_acs_redir_param = 6199 + kstrdup(str + 18, GFP_KERNEL); 6199 6200 } else { 6200 6201 printk(KERN_ERR "PCI: Unknown option `%s'\n", 6201 6202 str);