diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-06-15 16:47:33 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-06-15 16:47:33 -0400 |
commit | 3ee803641e76bea76ec730c80dcc64739a9919ff (patch) | |
tree | c456dfc049a818f9d6687bcba279336a83bbb01e | |
parent | af8c34ce6ae32addda3788d54a7e340cad22516b (diff) |
PCI/MSI: irqchip: Fix PCI_MSI dependencies
The PCI_MSI symbol is used inconsistently throughout the tree, with some
drivers using 'select' and others using 'depends on', or using conditional
selects. This keeps causing problems; the latest one is a result of
ARCH_ALPINE using a 'select' statement to enable its platform-specific MSI
driver without enabling MSI:
warning: (ARCH_ALPINE) selects ALPINE_MSI which has unmet direct dependencies (PCI && PCI_MSI)
drivers/irqchip/irq-alpine-msi.c:104:15: error: variable 'alpine_msix_domain_info' has initializer but incomplete type
static struct msi_domain_info alpine_msix_domain_info = {
^~~~~~~~~~~~~~~
drivers/irqchip/irq-alpine-msi.c:105:2: error: unknown field 'flags' specified in initializer
.flags = MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS |
^
drivers/irqchip/irq-alpine-msi.c:105:11: error: 'MSI_FLAG_USE_DEF_DOM_OPS' undeclared here (not in a function)
.flags = MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS |
^~~~~~~~~~~~~~~~~~~~~~~~
There is little reason to enable PCI support for a platform that uses MSI
but then leave MSI disabled at compile time.
Select PCI_MSI from irqchips that implement MSI, and make PCI host bridges
that use MSI on ARM depend on PCI_MSI_IRQ_DOMAIN.
For all three architectures that support PCI_MSI_IRQ_DOMAIN (ARM, ARM64,
X86), enable it by default whenever MSI is enabled.
[bhelgaas: changelog, omit crypto config change]
Suggested-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
-rw-r--r-- | arch/arm/Kconfig | 2 | ||||
-rw-r--r-- | arch/arm64/Kconfig | 4 | ||||
-rw-r--r-- | drivers/irqchip/Kconfig | 18 | ||||
-rw-r--r-- | drivers/pci/Kconfig | 2 | ||||
-rw-r--r-- | drivers/pci/host/Kconfig | 29 |
5 files changed, 31 insertions, 24 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 90542db1220d..354c167a2b42 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -715,7 +715,7 @@ config ARCH_VIRT | |||
715 | depends on ARCH_MULTI_V7 | 715 | depends on ARCH_MULTI_V7 |
716 | select ARM_AMBA | 716 | select ARM_AMBA |
717 | select ARM_GIC | 717 | select ARM_GIC |
718 | select ARM_GIC_V2M if PCI_MSI | 718 | select ARM_GIC_V2M if PCI |
719 | select ARM_GIC_V3 | 719 | select ARM_GIC_V3 |
720 | select ARM_PSCI | 720 | select ARM_PSCI |
721 | select HAVE_ARM_ARCH_TIMER | 721 | select HAVE_ARM_ARCH_TIMER |
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 5a0a691d4220..70ee71fda467 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig | |||
@@ -20,9 +20,9 @@ config ARM64 | |||
20 | select ARM_ARCH_TIMER | 20 | select ARM_ARCH_TIMER |
21 | select ARM_GIC | 21 | select ARM_GIC |
22 | select AUDIT_ARCH_COMPAT_GENERIC | 22 | select AUDIT_ARCH_COMPAT_GENERIC |
23 | select ARM_GIC_V2M if PCI_MSI | 23 | select ARM_GIC_V2M if PCI |
24 | select ARM_GIC_V3 | 24 | select ARM_GIC_V3 |
25 | select ARM_GIC_V3_ITS if PCI_MSI | 25 | select ARM_GIC_V3_ITS if PCI |
26 | select ARM_PSCI_FW | 26 | select ARM_PSCI_FW |
27 | select BUILDTIME_EXTABLE_SORT | 27 | select BUILDTIME_EXTABLE_SORT |
28 | select CLONE_BACKWARDS | 28 | select CLONE_BACKWARDS |
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig index fa33c50b0e5a..11ecb6cfb2e5 100644 --- a/drivers/irqchip/Kconfig +++ b/drivers/irqchip/Kconfig | |||
@@ -15,9 +15,9 @@ config ARM_GIC_MAX_NR | |||
15 | 15 | ||
16 | config ARM_GIC_V2M | 16 | config ARM_GIC_V2M |
17 | bool | 17 | bool |
18 | depends on ARM_GIC | 18 | depends on PCI |
19 | depends on PCI && PCI_MSI | 19 | select ARM_GIC |
20 | select PCI_MSI_IRQ_DOMAIN | 20 | select PCI_MSI |
21 | 21 | ||
22 | config GIC_NON_BANKED | 22 | config GIC_NON_BANKED |
23 | bool | 23 | bool |
@@ -31,7 +31,8 @@ config ARM_GIC_V3 | |||
31 | 31 | ||
32 | config ARM_GIC_V3_ITS | 32 | config ARM_GIC_V3_ITS |
33 | bool | 33 | bool |
34 | select PCI_MSI_IRQ_DOMAIN | 34 | depends on PCI |
35 | depends on PCI_MSI | ||
35 | 36 | ||
36 | config ARM_NVIC | 37 | config ARM_NVIC |
37 | bool | 38 | bool |
@@ -56,13 +57,13 @@ config ARM_VIC_NR | |||
56 | config ARMADA_370_XP_IRQ | 57 | config ARMADA_370_XP_IRQ |
57 | bool | 58 | bool |
58 | select GENERIC_IRQ_CHIP | 59 | select GENERIC_IRQ_CHIP |
59 | select PCI_MSI_IRQ_DOMAIN if PCI_MSI | 60 | select PCI_MSI if PCI |
60 | 61 | ||
61 | config ALPINE_MSI | 62 | config ALPINE_MSI |
62 | bool | 63 | bool |
63 | depends on PCI && PCI_MSI | 64 | depends on PCI |
65 | select PCI_MSI | ||
64 | select GENERIC_IRQ_CHIP | 66 | select GENERIC_IRQ_CHIP |
65 | select PCI_MSI_IRQ_DOMAIN | ||
66 | 67 | ||
67 | config ATMEL_AIC_IRQ | 68 | config ATMEL_AIC_IRQ |
68 | bool | 69 | bool |
@@ -111,7 +112,6 @@ config HISILICON_IRQ_MBIGEN | |||
111 | bool | 112 | bool |
112 | select ARM_GIC_V3 | 113 | select ARM_GIC_V3 |
113 | select ARM_GIC_V3_ITS | 114 | select ARM_GIC_V3_ITS |
114 | select GENERIC_MSI_IRQ_DOMAIN | ||
115 | 115 | ||
116 | config IMGPDC_IRQ | 116 | config IMGPDC_IRQ |
117 | bool | 117 | bool |
@@ -244,12 +244,10 @@ config IRQ_MXS | |||
244 | 244 | ||
245 | config MVEBU_ODMI | 245 | config MVEBU_ODMI |
246 | bool | 246 | bool |
247 | select GENERIC_MSI_IRQ_DOMAIN | ||
248 | 247 | ||
249 | config LS_SCFG_MSI | 248 | config LS_SCFG_MSI |
250 | def_bool y if SOC_LS1021A || ARCH_LAYERSCAPE | 249 | def_bool y if SOC_LS1021A || ARCH_LAYERSCAPE |
251 | depends on PCI && PCI_MSI | 250 | depends on PCI && PCI_MSI |
252 | select PCI_MSI_IRQ_DOMAIN | ||
253 | 251 | ||
254 | config PARTITION_PERCPU | 252 | config PARTITION_PERCPU |
255 | bool | 253 | bool |
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index 56389be5d08b..67f9916ff14d 100644 --- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig | |||
@@ -25,7 +25,7 @@ config PCI_MSI | |||
25 | If you don't know what to do here, say Y. | 25 | If you don't know what to do here, say Y. |
26 | 26 | ||
27 | config PCI_MSI_IRQ_DOMAIN | 27 | config PCI_MSI_IRQ_DOMAIN |
28 | bool | 28 | def_bool ARM || ARM64 || X86 |
29 | depends on PCI_MSI | 29 | depends on PCI_MSI |
30 | select GENERIC_MSI_IRQ_DOMAIN | 30 | select GENERIC_MSI_IRQ_DOMAIN |
31 | 31 | ||
diff --git a/drivers/pci/host/Kconfig b/drivers/pci/host/Kconfig index 5d2374e4ee7f..80cfe2f0a580 100644 --- a/drivers/pci/host/Kconfig +++ b/drivers/pci/host/Kconfig | |||
@@ -3,8 +3,9 @@ menu "PCI host controller drivers" | |||
3 | 3 | ||
4 | config PCI_DRA7XX | 4 | config PCI_DRA7XX |
5 | bool "TI DRA7xx PCIe controller" | 5 | bool "TI DRA7xx PCIe controller" |
6 | select PCIE_DW | ||
7 | depends on OF && HAS_IOMEM && TI_PIPE3 | 6 | depends on OF && HAS_IOMEM && TI_PIPE3 |
7 | depends on PCI_MSI_IRQ_DOMAIN | ||
8 | select PCIE_DW | ||
8 | help | 9 | help |
9 | Enables support for the PCIe controller in the DRA7xx SoC. There | 10 | Enables support for the PCIe controller in the DRA7xx SoC. There |
10 | are two instances of PCIe controller in DRA7xx. This controller can | 11 | are two instances of PCIe controller in DRA7xx. This controller can |
@@ -20,7 +21,7 @@ config PCI_MVEBU | |||
20 | config PCIE_XILINX_NWL | 21 | config PCIE_XILINX_NWL |
21 | bool "NWL PCIe Core" | 22 | bool "NWL PCIe Core" |
22 | depends on ARCH_ZYNQMP | 23 | depends on ARCH_ZYNQMP |
23 | select PCI_MSI_IRQ_DOMAIN if PCI_MSI | 24 | depends on PCI_MSI_IRQ_DOMAIN |
24 | help | 25 | help |
25 | Say 'Y' here if you want kernel support for Xilinx | 26 | Say 'Y' here if you want kernel support for Xilinx |
26 | NWL PCIe controller. The controller can act as Root Port | 27 | NWL PCIe controller. The controller can act as Root Port |
@@ -29,6 +30,7 @@ config PCIE_XILINX_NWL | |||
29 | 30 | ||
30 | config PCIE_DW_PLAT | 31 | config PCIE_DW_PLAT |
31 | bool "Platform bus based DesignWare PCIe Controller" | 32 | bool "Platform bus based DesignWare PCIe Controller" |
33 | depends on PCI_MSI_IRQ_DOMAIN | ||
32 | select PCIE_DW | 34 | select PCIE_DW |
33 | ---help--- | 35 | ---help--- |
34 | This selects the DesignWare PCIe controller support. Select this if | 36 | This selects the DesignWare PCIe controller support. Select this if |
@@ -40,16 +42,19 @@ config PCIE_DW_PLAT | |||
40 | 42 | ||
41 | config PCIE_DW | 43 | config PCIE_DW |
42 | bool | 44 | bool |
45 | depends on PCI_MSI_IRQ_DOMAIN | ||
43 | 46 | ||
44 | config PCI_EXYNOS | 47 | config PCI_EXYNOS |
45 | bool "Samsung Exynos PCIe controller" | 48 | bool "Samsung Exynos PCIe controller" |
46 | depends on SOC_EXYNOS5440 | 49 | depends on SOC_EXYNOS5440 |
50 | depends on PCI_MSI_IRQ_DOMAIN | ||
47 | select PCIEPORTBUS | 51 | select PCIEPORTBUS |
48 | select PCIE_DW | 52 | select PCIE_DW |
49 | 53 | ||
50 | config PCI_IMX6 | 54 | config PCI_IMX6 |
51 | bool "Freescale i.MX6 PCIe controller" | 55 | bool "Freescale i.MX6 PCIe controller" |
52 | depends on SOC_IMX6Q | 56 | depends on SOC_IMX6Q |
57 | depends on PCI_MSI_IRQ_DOMAIN | ||
53 | select PCIEPORTBUS | 58 | select PCIEPORTBUS |
54 | select PCIE_DW | 59 | select PCIE_DW |
55 | 60 | ||
@@ -72,8 +77,7 @@ config PCI_RCAR_GEN2 | |||
72 | config PCIE_RCAR | 77 | config PCIE_RCAR |
73 | bool "Renesas R-Car PCIe controller" | 78 | bool "Renesas R-Car PCIe controller" |
74 | depends on ARCH_RENESAS || (ARM && COMPILE_TEST) | 79 | depends on ARCH_RENESAS || (ARM && COMPILE_TEST) |
75 | select PCI_MSI | 80 | depends on PCI_MSI_IRQ_DOMAIN |
76 | select PCI_MSI_IRQ_DOMAIN | ||
77 | help | 81 | help |
78 | Say Y here if you want PCIe controller support on R-Car SoCs. | 82 | Say Y here if you want PCIe controller support on R-Car SoCs. |
79 | 83 | ||
@@ -92,6 +96,7 @@ config PCI_HOST_GENERIC | |||
92 | config PCIE_SPEAR13XX | 96 | config PCIE_SPEAR13XX |
93 | bool "STMicroelectronics SPEAr PCIe controller" | 97 | bool "STMicroelectronics SPEAr PCIe controller" |
94 | depends on ARCH_SPEAR13XX | 98 | depends on ARCH_SPEAR13XX |
99 | depends on PCI_MSI_IRQ_DOMAIN | ||
95 | select PCIEPORTBUS | 100 | select PCIEPORTBUS |
96 | select PCIE_DW | 101 | select PCIE_DW |
97 | help | 102 | help |
@@ -100,6 +105,7 @@ config PCIE_SPEAR13XX | |||
100 | config PCI_KEYSTONE | 105 | config PCI_KEYSTONE |
101 | bool "TI Keystone PCIe controller" | 106 | bool "TI Keystone PCIe controller" |
102 | depends on ARCH_KEYSTONE | 107 | depends on ARCH_KEYSTONE |
108 | depends on PCI_MSI_IRQ_DOMAIN | ||
103 | select PCIE_DW | 109 | select PCIE_DW |
104 | select PCIEPORTBUS | 110 | select PCIEPORTBUS |
105 | help | 111 | help |
@@ -120,7 +126,6 @@ config PCI_XGENE | |||
120 | depends on ARCH_XGENE | 126 | depends on ARCH_XGENE |
121 | depends on OF | 127 | depends on OF |
122 | select PCIEPORTBUS | 128 | select PCIEPORTBUS |
123 | select PCI_MSI_IRQ_DOMAIN if PCI_MSI | ||
124 | help | 129 | help |
125 | Say Y here if you want internal PCI support on APM X-Gene SoC. | 130 | Say Y here if you want internal PCI support on APM X-Gene SoC. |
126 | There are 5 internal PCIe ports available. Each port is GEN3 capable | 131 | There are 5 internal PCIe ports available. Each port is GEN3 capable |
@@ -128,7 +133,8 @@ config PCI_XGENE | |||
128 | 133 | ||
129 | config PCI_XGENE_MSI | 134 | config PCI_XGENE_MSI |
130 | bool "X-Gene v1 PCIe MSI feature" | 135 | bool "X-Gene v1 PCIe MSI feature" |
131 | depends on PCI_XGENE && PCI_MSI | 136 | depends on PCI_XGENE |
137 | depends on PCI_MSI_IRQ_DOMAIN | ||
132 | default y | 138 | default y |
133 | help | 139 | help |
134 | Say Y here if you want PCIe MSI support for the APM X-Gene v1 SoC. | 140 | Say Y here if you want PCIe MSI support for the APM X-Gene v1 SoC. |
@@ -137,6 +143,7 @@ config PCI_XGENE_MSI | |||
137 | config PCI_LAYERSCAPE | 143 | config PCI_LAYERSCAPE |
138 | bool "Freescale Layerscape PCIe controller" | 144 | bool "Freescale Layerscape PCIe controller" |
139 | depends on OF && (ARM || ARCH_LAYERSCAPE) | 145 | depends on OF && (ARM || ARCH_LAYERSCAPE) |
146 | depends on PCI_MSI_IRQ_DOMAIN | ||
140 | select PCIE_DW | 147 | select PCIE_DW |
141 | select MFD_SYSCON | 148 | select MFD_SYSCON |
142 | help | 149 | help |
@@ -177,8 +184,7 @@ config PCIE_IPROC_BCMA | |||
177 | config PCIE_IPROC_MSI | 184 | config PCIE_IPROC_MSI |
178 | bool "Broadcom iProc PCIe MSI support" | 185 | bool "Broadcom iProc PCIe MSI support" |
179 | depends on PCIE_IPROC_PLATFORM || PCIE_IPROC_BCMA | 186 | depends on PCIE_IPROC_PLATFORM || PCIE_IPROC_BCMA |
180 | depends on PCI_MSI | 187 | depends on PCI_MSI_IRQ_DOMAIN |
181 | select PCI_MSI_IRQ_DOMAIN | ||
182 | default ARCH_BCM_IPROC | 188 | default ARCH_BCM_IPROC |
183 | help | 189 | help |
184 | Say Y here if you want to enable MSI support for Broadcom's iProc | 190 | Say Y here if you want to enable MSI support for Broadcom's iProc |
@@ -195,8 +201,8 @@ config PCIE_ALTERA | |||
195 | 201 | ||
196 | config PCIE_ALTERA_MSI | 202 | config PCIE_ALTERA_MSI |
197 | bool "Altera PCIe MSI feature" | 203 | bool "Altera PCIe MSI feature" |
198 | depends on PCIE_ALTERA && PCI_MSI | 204 | depends on PCIE_ALTERA |
199 | select PCI_MSI_IRQ_DOMAIN | 205 | depends on PCI_MSI_IRQ_DOMAIN |
200 | help | 206 | help |
201 | Say Y here if you want PCIe MSI support for the Altera FPGA. | 207 | Say Y here if you want PCIe MSI support for the Altera FPGA. |
202 | This MSI driver supports Altera MSI to GIC controller IP. | 208 | This MSI driver supports Altera MSI to GIC controller IP. |
@@ -204,6 +210,7 @@ config PCIE_ALTERA_MSI | |||
204 | config PCI_HISI | 210 | config PCI_HISI |
205 | depends on OF && ARM64 | 211 | depends on OF && ARM64 |
206 | bool "HiSilicon Hip05 and Hip06 SoCs PCIe controllers" | 212 | bool "HiSilicon Hip05 and Hip06 SoCs PCIe controllers" |
213 | depends on PCI_MSI_IRQ_DOMAIN | ||
207 | select PCIEPORTBUS | 214 | select PCIEPORTBUS |
208 | select PCIE_DW | 215 | select PCIE_DW |
209 | help | 216 | help |
@@ -213,6 +220,7 @@ config PCI_HISI | |||
213 | config PCIE_QCOM | 220 | config PCIE_QCOM |
214 | bool "Qualcomm PCIe controller" | 221 | bool "Qualcomm PCIe controller" |
215 | depends on ARCH_QCOM && OF | 222 | depends on ARCH_QCOM && OF |
223 | depends on PCI_MSI_IRQ_DOMAIN | ||
216 | select PCIE_DW | 224 | select PCIE_DW |
217 | select PCIEPORTBUS | 225 | select PCIEPORTBUS |
218 | help | 226 | help |
@@ -237,6 +245,7 @@ config PCI_HOST_THUNDER_ECAM | |||
237 | config PCIE_ARMADA_8K | 245 | config PCIE_ARMADA_8K |
238 | bool "Marvell Armada-8K PCIe controller" | 246 | bool "Marvell Armada-8K PCIe controller" |
239 | depends on ARCH_MVEBU | 247 | depends on ARCH_MVEBU |
248 | depends on PCI_MSI_IRQ_DOMAIN | ||
240 | select PCIE_DW | 249 | select PCIE_DW |
241 | select PCIEPORTBUS | 250 | select PCIEPORTBUS |
242 | help | 251 | help |