]> git.baikalelectronics.ru Git - kernel.git/commitdiff
MIPS: Skip IPI setup if we only have 1 CPU
authorPaul Burton <paul.burton@imgtec.com>
Fri, 2 Jun 2017 21:48:49 +0000 (14:48 -0700)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 29 Jun 2017 00:42:27 +0000 (02:42 +0200)
If we're running on a system with only 1 possible CPU then it makes no
sense to reserve or initialise IPIs since we'll never use them. Avoid
doing so.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/16192/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/smp.c

index aba1afb64b620a9922482ca12576e287463a511f..770d4d1516cbb1ff34cca30cdccbe6c1b0aeebdc 100644 (file)
@@ -335,6 +335,9 @@ int mips_smp_ipi_free(const struct cpumask *mask)
 
 static int __init mips_smp_ipi_init(void)
 {
+       if (num_possible_cpus() == 1)
+               return 0;
+
        mips_smp_ipi_allocate(cpu_possible_mask);
 
        call_desc = irq_to_desc(call_virq);