Skip to contentSkip to conversation

irqchip: build IMX_MU_MSI only on ARM

PATCH In review Arnd Bergmann 2 participants 2 messages Dec 15, 2022 irqchip drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 irqchip: build IMX_MU_MSI only on ARM

From: Arnd Bergmann <[email protected]>

compile-testing IMX_MU_MSI on x86 without PCI_MSI support results in a build failure:

arch/x86/kernel/hpet.c:520:46: error: 'msi_alloc_info_t' {aka 'struct irq_alloc_info'} has no member named 'hwirq'
520 | irq_domain_set_info(domain, virq, arg->hwirq, info->chip, NULL,
| ^~
arch/x86/kernel/hpet.c:521:49: error: 'msi_alloc_info_t' {aka 'struct irq_alloc_info'} has no member named 'data'
521 | handle_edge_irq, arg->data, "edge");
| ^~
arch/x86/kernel/hpet.c: In function 'hpet_create_irq_domain':
arch/x86/kernel/hpet.c:550:13: error: 'x86_vector_domain' undeclared (first use in this function)
550 | if (x86_vector_domain == NULL)

      |             ^~~~~~~~~~~~~~~~~

arch/x86/kernel/hpet.c:550:13: note: each undeclared identifier is reported only once for each function it appears in arch/x86/kernel/hpet.c: In function 'hpet_assign_irq':
arch/x86/kernel/hpet.c:600:9: error: implicit declaration of function 'init_irq_alloc_info' [-Werror=implicit-function-declaration]
600 | init_irq_alloc_info(&info, NULL);

Tighten the dependency further to only allow compile testing on Arm. This could be refined further to allow certain x86 configs.

Fixes 6c9f7434159b ("irqchip: IMX_MU_MSI should depend on ARCH_MXC")
---
 drivers/irqchip/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/Kconfig +1 -1
index caa952c40ff9..4ebf4d566e6f 100644
@@ -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 || ((ARM || ARM64) && COMPILE_TEST)
 	default m if ARCH_MXC
 	select IRQ_DOMAIN
 	select IRQ_DOMAIN_HIERARCHY
Signature · 1 line
2.35.1
#1 lore raw

Hi Arnd,

Quoted 14 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

compile-testing IMX_MU_MSI on x86 without PCI_MSI support results in a build failure:

arch/x86/kernel/hpet.c:520:46: error: 'msi_alloc_info_t' {aka 'struct irq_alloc_info'} has no member named 'hwirq'
520 | irq_domain_set_info(domain, virq, arg->hwirq, info->chip, NULL,
| ^~
arch/x86/kernel/hpet.c:521:49: error: 'msi_alloc_info_t' {aka 'struct irq_alloc_info'} has no member named 'data'
521 | handle_edge_irq, arg->data, "edge");
| ^~
arch/x86/kernel/hpet.c: In function 'hpet_create_irq_domain':
arch/x86/kernel/hpet.c:550:13: error: 'x86_vector_domain' undeclared (first use in this function)
550 | if (x86_vector_domain == NULL)

Quoted 8 lines
      |             ^~~~~~~~~~~~~~~~~

arch/x86/kernel/hpet.c:550:13: note: each undeclared identifier is reported only once for each function it appears in arch/x86/kernel/hpet.c: In function 'hpet_assign_irq':
arch/x86/kernel/hpet.c:600:9: error: implicit declaration of function 'init_irq_alloc_info' [-Werror=implicit-function-declaration]
600 | init_irq_alloc_info(&info, NULL);

Tighten the dependency further to only allow compile testing on Arm. This could be refined further to allow certain x86 configs.

Thanks for your patch!

Quoted 1 line
Fixes 6c9f7434159b ("irqchip: IMX_MU_MSI should depend on ARCH_MXC")

This is not the commit that introduced the issue.

Fixes 70afdab904d2d1e6 ("irqchip: Add IMX MU MSI controller driver")
Quoted 10 lines
---
 drivers/irqchip/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/Kconfig +0 -0
index caa952c40ff9..4ebf4d566e6f 100644

drivers/irqchip/Kconfig config IMX_INTMUX · line 487

Quoted 5 lines
drivers/irqchip/Kconfig +1 -1
@@ -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 || ((ARM || ARM64) && COMPILE_TEST)

I think adding a separate line

    depends on ARM || ARM64

is easier to read (and easier to extend).

drivers/irqchip/Kconfig config IMX_INTMUX · line 490

Quoted 3 lines
drivers/irqchip/Kconfig +0 -0
        default m if ARCH_MXC
        select IRQ_DOMAIN
        select IRQ_DOMAIN_HIERARCHY

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds