On Sun, Aug 10, 2025 at 12:37:31PM -0700, Guenter Roeck wrote:
The new code calls irq_domain_alloc_descs(), making it dependent
on IRQ_DOMAIN. However, specifying that dependency directly is not
possible:
config IRQ_KUNIT_TEST
bool "KUnit tests for IRQ management APIs" if !KUNIT_ALL_TESTS
depends on KUNIT=y
+ depends on IRQ_DOMAIN
default KUNIT_ALL_TESTS
imply SMP
help
results in:
*** Default configuration is based on 'defconfig'
error: recursive dependency detected!
symbol SMP is implied by IRQ_KUNIT_TEST
symbol IRQ_KUNIT_TEST depends on IRQ_DOMAIN
symbol IRQ_DOMAIN is selected by IRQ_DOMAIN_HIERARCHY
symbol IRQ_DOMAIN_HIERARCHY is selected by GENERIC_IRQ_IPI
symbol GENERIC_IRQ_IPI depends on SMP
This is seen with alpha configurations such as alpha:defconfig after
adding the IRQ_DOMAIN dependency.
I have no idea how to resolve this. For now I disabled IRQ_KUNIT_TEST
for my alpha test builds.
How about 'select'? That's the usual way IRQ_DOMAIN is managed anyway.
It builds for me, but my distro doesn't provide an Alpha QEMU, so I
can't test it.
--- a/kernel/irq/Kconfig
+++ b/kernel/irq/Kconfig
@@ -148,6 +148,7 @@ config IRQ_KUNIT_TEST
bool "KUnit tests for IRQ management APIs" if !KUNIT_ALL_TESTS
depends on KUNIT=y
default KUNIT_ALL_TESTS
+ select IRQ_DOMAIN
imply SMP
help
This option enables KUnit tests for the IRQ subsystem API. These are