5cc7cba1941f05308f82c9d5b8e8a059055f949c
[linux-2.6-microblaze.git] / drivers / pci / Kconfig
1 # SPDX-License-Identifier: GPL-2.0
2 #
3 # PCI configuration
4 #
5
6 # select this to offer the PCI prompt
7 config HAVE_PCI
8         bool
9
10 # select this to unconditionally force on PCI support
11 config FORCE_PCI
12         bool
13         select HAVE_PCI
14         select PCI
15
16 menuconfig PCI
17         bool "PCI support"
18         depends on HAVE_PCI
19         help
20           This option enables support for the PCI local bus, including
21           support for PCI-X and the foundations for PCI Express support.
22           Say 'Y' here unless you know what you are doing.
23
24 if PCI
25
26 config PCI_DOMAINS
27         bool
28         depends on PCI
29
30 config PCI_DOMAINS_GENERIC
31         bool
32         select PCI_DOMAINS
33
34 config PCI_SYSCALL
35         bool
36
37 source "drivers/pci/pcie/Kconfig"
38
39 config PCI_MSI
40         bool "Message Signaled Interrupts (MSI and MSI-X)"
41         select GENERIC_MSI_IRQ
42         help
43            This allows device drivers to enable MSI (Message Signaled
44            Interrupts).  Message Signaled Interrupts enable a device to
45            generate an interrupt using an inbound Memory Write on its
46            PCI bus instead of asserting a device IRQ pin.
47
48            Use of PCI MSI interrupts can be disabled at kernel boot time
49            by using the 'pci=nomsi' option.  This disables MSI for the
50            entire system.
51
52            If you don't know what to do here, say Y.
53
54 config PCI_MSI_IRQ_DOMAIN
55         def_bool y
56         depends on PCI_MSI
57         select GENERIC_MSI_IRQ_DOMAIN
58
59 config PCI_MSI_ARCH_FALLBACKS
60         bool
61
62 config PCI_QUIRKS
63         default y
64         bool "Enable PCI quirk workarounds" if EXPERT
65         help
66           This enables workarounds for various PCI chipset bugs/quirks.
67           Disable this only if your target machine is unaffected by PCI
68           quirks.
69
70 config PCI_DEBUG
71         bool "PCI Debugging"
72         depends on DEBUG_KERNEL
73         help
74           Say Y here if you want the PCI core to produce a bunch of debug
75           messages to the system log.  Select this if you are having a
76           problem with PCI support and want to see more of what is going on.
77
78           When in doubt, say N.
79
80 config PCI_REALLOC_ENABLE_AUTO
81         bool "Enable PCI resource re-allocation detection"
82         depends on PCI_IOV
83         help
84           Say Y here if you want the PCI core to detect if PCI resource
85           re-allocation needs to be enabled. You can always use pci=realloc=on
86           or pci=realloc=off to override it.  It will automatically
87           re-allocate PCI resources if SR-IOV BARs have not been allocated by
88           the BIOS.
89
90           When in doubt, say N.
91
92 config PCI_STUB
93         tristate "PCI Stub driver"
94         help
95           Say Y or M here if you want be able to reserve a PCI device
96           when it is going to be assigned to a guest operating system.
97
98           When in doubt, say N.
99
100 config PCI_PF_STUB
101         tristate "PCI PF Stub driver"
102         depends on PCI_IOV
103         help
104           Say Y or M here if you want to enable support for devices that
105           require SR-IOV support, while at the same time the PF (Physical
106           Function) itself is not providing any actual services on the
107           host itself such as storage or networking.
108
109           When in doubt, say N.
110
111 config XEN_PCIDEV_FRONTEND
112         tristate "Xen PCI Frontend"
113         depends on XEN_PV
114         select PCI_XEN
115         select XEN_XENBUS_FRONTEND
116         default y
117         help
118           The PCI device frontend driver allows the kernel to import arbitrary
119           PCI devices from a PCI backend to support PCI driver domains.
120
121 config PCI_ATS
122         bool
123
124 config PCI_ECAM
125         bool
126
127 config PCI_LOCKLESS_CONFIG
128         bool
129
130 config PCI_BRIDGE_EMUL
131         bool
132
133 config PCI_IOV
134         bool "PCI IOV support"
135         select PCI_ATS
136         help
137           I/O Virtualization is a PCI feature supported by some devices
138           which allows them to create virtual devices which share their
139           physical resources.
140
141           If unsure, say N.
142
143 config PCI_PRI
144         bool "PCI PRI support"
145         select PCI_ATS
146         help
147           PRI is the PCI Page Request Interface. It allows PCI devices that are
148           behind an IOMMU to recover from page faults.
149
150           If unsure, say N.
151
152 config PCI_PASID
153         bool "PCI PASID support"
154         select PCI_ATS
155         help
156           Process Address Space Identifiers (PASIDs) can be used by PCI devices
157           to access more than one IO address space at the same time. To make
158           use of this feature an IOMMU is required which also supports PASIDs.
159           Select this option if you have such an IOMMU and want to compile the
160           driver for it into your kernel.
161
162           If unsure, say N.
163
164 config PCI_P2PDMA
165         bool "PCI peer-to-peer transfer support"
166         depends on ZONE_DEVICE
167         #
168         # The need for the scatterlist DMA bus address flag means PCI P2PDMA
169         # requires 64bit
170         #
171         depends on 64BIT
172         select GENERIC_ALLOCATOR
173         help
174           EnableŃ• drivers to do PCI peer-to-peer transactions to and from
175           BARs that are exposed in other devices that are the part of
176           the hierarchy where peer-to-peer DMA is guaranteed by the PCI
177           specification to work (ie. anything below a single PCI bridge).
178
179           Many PCIe root complexes do not support P2P transactions and
180           it's hard to tell which support it at all, so at this time,
181           P2P DMA transactions must be between devices behind the same root
182           port.
183
184           If unsure, say N.
185
186 config PCI_LABEL
187         def_bool y if (DMI || ACPI)
188         select NLS
189
190 config PCI_HYPERV
191         tristate "Hyper-V PCI Frontend"
192         depends on ((X86 && X86_64) || ARM64) && HYPERV && PCI_MSI && PCI_MSI_IRQ_DOMAIN && SYSFS
193         select PCI_HYPERV_INTERFACE
194         help
195           The PCI device frontend driver allows the kernel to import arbitrary
196           PCI devices from a PCI backend to support PCI driver domains.
197
198 choice
199         prompt "PCI Express hierarchy optimization setting"
200         default PCIE_BUS_DEFAULT
201         depends on PCI && EXPERT
202         help
203           MPS (Max Payload Size) and MRRS (Max Read Request Size) are PCIe
204           device parameters that affect performance and the ability to
205           support hotplug and peer-to-peer DMA.
206
207           The following choices set the MPS and MRRS optimization strategy
208           at compile-time.  The choices are the same as those offered for
209           the kernel command-line parameter 'pci', i.e.,
210           'pci=pcie_bus_tune_off', 'pci=pcie_bus_safe',
211           'pci=pcie_bus_perf', and 'pci=pcie_bus_peer2peer'.
212
213           This is a compile-time setting and can be overridden by the above
214           command-line parameters.  If unsure, choose PCIE_BUS_DEFAULT.
215
216 config PCIE_BUS_TUNE_OFF
217         bool "Tune Off"
218         depends on PCI
219         help
220           Use the BIOS defaults; don't touch MPS at all.  This is the same
221           as booting with 'pci=pcie_bus_tune_off'.
222
223 config PCIE_BUS_DEFAULT
224         bool "Default"
225         depends on PCI
226         help
227           Default choice; ensure that the MPS matches upstream bridge.
228
229 config PCIE_BUS_SAFE
230         bool "Safe"
231         depends on PCI
232         help
233           Use largest MPS that boot-time devices support.  If you have a
234           closed system with no possibility of adding new devices, this
235           will use the largest MPS that's supported by all devices.  This
236           is the same as booting with 'pci=pcie_bus_safe'.
237
238 config PCIE_BUS_PERFORMANCE
239         bool "Performance"
240         depends on PCI
241         help
242           Use MPS and MRRS for best performance.  Ensure that a given
243           device's MPS is no larger than its parent MPS, which allows us to
244           keep all switches/bridges to the max MPS supported by their
245           parent.  This is the same as booting with 'pci=pcie_bus_perf'.
246
247 config PCIE_BUS_PEER2PEER
248         bool "Peer2peer"
249         depends on PCI
250         help
251           Set MPS = 128 for all devices.  MPS configuration effected by the
252           other options could cause the MPS on one root port to be
253           different than that of the MPS on another, which may cause
254           hot-added devices or peer-to-peer DMA to fail.  Set MPS to the
255           smallest possible value (128B) system-wide to avoid these issues.
256           This is the same as booting with 'pci=pcie_bus_peer2peer'.
257
258 endchoice
259
260 config VGA_ARB
261         bool "VGA Arbitration" if EXPERT
262         default y
263         depends on (PCI && !S390)
264         help
265           Some "legacy" VGA devices implemented on PCI typically have the same
266           hard-decoded addresses as they did on ISA. When multiple PCI devices
267           are accessed at same time they need some kind of coordination. Please
268           see Documentation/gpu/vgaarbiter.rst for more details. Select this to
269           enable VGA arbiter.
270
271 config VGA_ARB_MAX_GPUS
272         int "Maximum number of GPUs"
273         default 16
274         depends on VGA_ARB
275         help
276           Reserves space in the kernel to maintain resource locking for
277           multiple GPUS.  The overhead for each GPU is very small.
278
279 source "drivers/pci/hotplug/Kconfig"
280 source "drivers/pci/controller/Kconfig"
281 source "drivers/pci/endpoint/Kconfig"
282 source "drivers/pci/switch/Kconfig"
283
284 endif