]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
LoongArch: Switch to irq_set_nr_irqs()
authorBart Van Assche <bvanassche@acm.org>
Tue, 15 Oct 2024 19:09:34 +0000 (12:09 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 16 Oct 2024 19:56:56 +0000 (21:56 +0200)
Use the irq_set_nr_irqs() function instead of the global variable
'nr_irqs'. Prepare for changing 'nr_irqs' from an exported global
variable into a variable with file scope.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20241015190953.1266194-4-bvanassche@acm.org
arch/loongarch/kernel/irq.c

index d129039b368b09a97d06fff47a59f89e581ff672..80946cafaec1b29b0a86ad2f7cea6058f951e059 100644 (file)
@@ -92,9 +92,9 @@ int __init arch_probe_nr_irqs(void)
        int nr_io_pics = bitmap_weight(loongson_sysconf.cores_io_master, NR_CPUS);
 
        if (!cpu_has_avecint)
-               nr_irqs = (64 + NR_VECTORS * nr_io_pics);
+               irq_set_nr_irqs(64 + NR_VECTORS * nr_io_pics);
        else
-               nr_irqs = (64 + NR_VECTORS * (nr_cpu_ids + nr_io_pics));
+               irq_set_nr_irqs(64 + NR_VECTORS * (nr_cpu_ids + nr_io_pics));
 
        return NR_IRQS_LEGACY;
 }