summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuan-Wei Chiu <visitorckw@gmail.com>2026-10-01 10:25:15 +0200
committerPeter Zijlstra <peterz@infradead.org>2026-10-02 11:40:12 +0200
commit26f6b6357b1b06e6aaa9b8d796989cca785d8e1d (patch)
tree946846adf875e05918005a175b6487070a71fe1f
parent72d3fcf802c45d00b300f25b848a93c3a2bd7c7e (diff)
downloadlinux-stable-26f6b6357b1b06e6aaa9b8d796989cca785d8e1d.tar.gz
linux-stable-26f6b6357b1b06e6aaa9b8d796989cca785d8e1d.zip
irq: Make refcount_interrupt kunit test selectable
Currently, refcount_interrupt_test is built unconditionally when CONFIG_KUNIT is enabled, causing it to run unexpectedly during boot. Fix this by introducing CONFIG_REFCOUNT_INTERRUPT_KUNIT_TEST so the test can be configured independently, following standard kunit practices. Fixes: 07a88e2bcd5b ("irq: Add KUnit test for refcounted interrupt enable/disable") Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Radu Rendec <radu@rendec.net> Reviewed-by: Boqun Feng <boqun@kernel.org> Link: https://patch.msgid.link/20261001082519.16195-2-boqun@kernel.org
-rw-r--r--kernel/irq/Kconfig12
-rw-r--r--kernel/irq/Makefile2
2 files changed, 13 insertions, 1 deletions
diff --git a/kernel/irq/Kconfig b/kernel/irq/Kconfig
index 05cba4e16..6923f37ea 100644
--- a/kernel/irq/Kconfig
+++ b/kernel/irq/Kconfig
@@ -150,6 +150,18 @@ config IRQ_KUNIT_TEST
If unsure, say N.
+config REFCOUNT_INTERRUPT_KUNIT_TEST
+ tristate "Test refcounted interrupt enable/disable" if !KUNIT_ALL_TESTS
+ depends on KUNIT
+ default KUNIT_ALL_TESTS
+ help
+ This builds the kunit tests for the refcounted interrupt
+ infrastructure. It verifies the correctness of single, nested,
+ and multiple interrupt enable/disable state changes and ensures
+ that the underlying reference counting mechanisms work as expected.
+
+ If unsure, say N.
+
endmenu
config GENERIC_IRQ_MULTI_HANDLER
diff --git a/kernel/irq/Makefile b/kernel/irq/Makefile
index 44c4d6fc5..0e5df962a 100644
--- a/kernel/irq/Makefile
+++ b/kernel/irq/Makefile
@@ -16,4 +16,4 @@ obj-$(CONFIG_SMP) += affinity.o
obj-$(CONFIG_GENERIC_IRQ_DEBUGFS) += debugfs.o
obj-$(CONFIG_GENERIC_IRQ_MATRIX_ALLOCATOR) += matrix.o
obj-$(CONFIG_IRQ_KUNIT_TEST) += irq_test.o
-obj-$(CONFIG_KUNIT) += refcount_interrupt_test.o
+obj-$(CONFIG_REFCOUNT_INTERRUPT_KUNIT_TEST) += refcount_interrupt_test.o