[PATCH] irqchip/imx: Do not unconditionally enable GENERIC_MSI_IRQ

Ingo Molnar
2023-01-13T12:22:42Z

* tip-bot2 for Thomas Gleixner <tip-bot2@linutronix.de> wrote:

> The following commit has been merged into the irq/core branch of tip:
>
> Commit-ID: 13e7accb81d6c07993385af8342238ff22b41ac8
> Gitweb: https://git.kernel.org/tip/13e7accb81d6c07993385af8342238ff22b41ac8
> Author: Thomas Gleixner <tglx@linutronix.de>
> AuthorDate: Fri, 11 Nov 2022 14:54:40 +01:00
> Committer: Thomas Gleixner <tglx@linutronix.de>
> CommitterDate: Thu, 17 Nov 2022 15:15:20 +01:00
>
> genirq: Get rid of GENERIC_MSI_IRQ_DOMAIN
>
> Adjust to reality and remove another layer of pointless Kconfig
> indirection. CONFIG_GENERIC_MSI_IRQ is good enough to serve
> all purposes.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
> Link: https://lore.kernel.org/r/20221111122014.524842979@linutronix.de

The above commit started triggering a CONFIG_COMPILE_TEST=y build error on
non-APIC x86 builds, the most straightforward fix is to only build that
driver on ARM - given the dependency mess force-selected options generally
cause.

Any better solutions?

Thanks,

Ingo

=====================>
From: Ingo Molnar <mingo@kernel.org>
Date: Fri, 13 Jan 2023 13:10:05 +0100
Subject: [PATCH] irqchip/imx: Do not unconditionally enable GENERIC_MSI_IRQ

The IMX_MU_MSI ARM driver force-selects CONFIG_GENERIC_MSI_IRQ if CONFIG_COMPILE_TEST=y:

config IMX_MU_MSI
tristate "i.MX MU used as MSI controller"
depends on OF && HAS_IOMEM
depends on ARCH_MXC || COMPILE_TEST
default m if ARCH_MXC
select IRQ_DOMAIN
select IRQ_DOMAIN_HIERARCHY
select GENERIC_MSI_IRQ
help

But that's not unconditionally valid - for example on x86 UP kernel builds
that have the local APIC disabled there's no MSI functionality - resulting
in build failures like:

./include/linux/gpio/driver.h:32:33: error: field ‘msiinfo’ has incomplete type
kernel/irq/msi.c:739:19: error: invalid use of incomplete typedef ‘msi_alloc_info_t’ {aka ‘struct irq_alloc_info’}

Fixes: 13e7accb81d6 genirq: ("Get rid of GENERIC_MSI_IRQ_DOMAIN")
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
drivers/irqchip/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index caa952c40ff9..39578da6ee45 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -484,7 +484,7 @@ config IMX_INTMUX
config IMX_MU_MSI
tristate "i.MX MU used as MSI controller"
depends on OF && HAS_IOMEM
- depends on ARCH_MXC || COMPILE_TEST
+ depends on ARCH_MXC
default m if ARCH_MXC
select IRQ_DOMAIN
select IRQ_DOMAIN_HIERARCHY