aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/smp.c
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2017-06-02 14:48:49 -0700
committerRalf Baechle <ralf@linux-mips.org>2017-06-29 02:42:27 +0200
commit9b03d8abe06d92195712fd489b2e8983de27fa68 (patch)
treefc7de41aff5c54d5c040274b6bd1fd96e7a6af8e /arch/mips/kernel/smp.c
parentMIPS: Use `pr_debug' for messages from `__compute_return_epc_for_insn' (diff)
downloadlinux-dev-9b03d8abe06d92195712fd489b2e8983de27fa68.tar.xz
linux-dev-9b03d8abe06d92195712fd489b2e8983de27fa68.zip
MIPS: Skip IPI setup if we only have 1 CPU
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>
Diffstat (limited to 'arch/mips/kernel/smp.c')
-rw-r--r--arch/mips/kernel/smp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index aba1afb64b62..770d4d1516cb 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -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);