[PATCH] arm/arm64/irqchip/pci: fix PCI_MSI dependencies

Bjorn Helgaas helgaas at kernel.org
Wed Jun 15 14:02:11 PDT 2016


On Wed, Jun 15, 2016 at 10:09:38PM +0200, Arnd Bergmann wrote:
> 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,
> and the latest one is a result of ARCH_ALPINE using a 'select'
> statement to enable its platform specific MSI driver but not
> enabling MSI support first:
> 
> 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 leaving MSI disabled at compile time.
> 
> I sent an earlier version that used 'select PCI_MSI' everywhere
> in March, but that caused build regressions on x86.
> 
> This version instead selects PCI_MSI from irqchips that implement MSI,
> and makes PCI host bridges that use MSI on ARM depend on PCI_MSI_IRQ_DOMAIN,
> which in turn is now enabled by default on all three architectures that
> support it, whenever MSI is enabled.
> 
> I think it makes most sense to merge this patch through the PCI tree,
> as new PCI host drivers get added occasionally, and they all need to
> be adapted for this change.
> 
> Signed-off-by: Arnd Bergmann <arnd at arndb.de>
> Suggested-by: Marc Zyngier <marc.zyngier at arm.com>
> Acked-by: Marc Zyngier <marc.zyngier at arm.com>

I applied this to pci/msi, minus the crypto change that looks unrelated:

> @@ -1038,6 +1038,8 @@ source "arch/arm64/Kconfig.debug"
>  source "security/Kconfig"
>  
>  source "crypto/Kconfig"
> +if CRYPTO
>  source "arch/arm64/crypto/Kconfig"
> +endif



More information about the linux-arm-kernel mailing list