]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
LoongArch: Define ARCH_IRQ_INIT_FLAGS as IRQ_NOPROBE
authorHuacai Chen <chenhuacai@loongson.cn>
Mon, 26 Aug 2024 15:11:32 +0000 (23:11 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 30 Sep 2024 14:25:09 +0000 (16:25 +0200)
[ Upstream commit 274ea3563e5ab9f468c15bfb9d2492803a66d9be ]

Currently we call irq_set_noprobe() in a loop for all IRQs, but indeed
it only works for IRQs below NR_IRQS_LEGACY because at init_IRQ() only
legacy interrupts have been allocated.

Instead, we can define ARCH_IRQ_INIT_FLAGS as IRQ_NOPROBE in asm/hwirq.h
and the core will automatically set the flag for all interrupts.

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Tianyang Zhang <zhangtianyang@loongson.cn>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/loongarch/include/asm/hw_irq.h
arch/loongarch/kernel/irq.c

index af4f4e8fbd858f701490f4e590e7ec18c51085e1..8156ffb67415918d497a04413ab3c6fd6e913e15 100644 (file)
@@ -9,6 +9,8 @@
 
 extern atomic_t irq_err_count;
 
+#define ARCH_IRQ_INIT_FLAGS    IRQ_NOPROBE
+
 /*
  * interrupt-retrigger: NOP for now. This may not be appropriate for all
  * machines, we'll see ...
index 883e5066ae445fa157c74fc9eb65939a5770f159..df42c063f6c4308bf96c13b94fdffe90a6db23b9 100644 (file)
@@ -122,9 +122,6 @@ void __init init_IRQ(void)
                panic("IPI IRQ request failed\n");
 #endif
 
-       for (i = 0; i < NR_IRQS; i++)
-               irq_set_noprobe(i);
-
        for_each_possible_cpu(i) {
                page = alloc_pages_node(cpu_to_node(i), GFP_KERNEL, order);