summaryrefslogtreecommitdiff
path: root/arch/mips/loongson64/loongson-3
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2017-08-13 05:49:40 +0300
committerRalf Baechle <ralf@linux-mips.org>2017-08-30 01:57:27 +0300
commitd595d423d06071bd7a4892c3c2f16bfe1d5b3a85 (patch)
treebabe4bf15082b7528e8c316dc0ec8630b0e24df9 /arch/mips/loongson64/loongson-3
parent68923cdc2eb34124d77bc27f7945d7ff16b236dd (diff)
downloadlinux-d595d423d06071bd7a4892c3c2f16bfe1d5b3a85.tar.xz
MIPS: SMP: Allow boot_secondary SMP op to return errors
Allow the boot_secondary SMP op to return an error to __cpu_up(), which will in turn return it to its caller. This will allow SMP implementations to return errors quickly in cases they they know have failed, rather than relying upon __cpu_up() eventually timing out waiting for the cpu_running completion. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17014/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/loongson64/loongson-3')
-rw-r--r--arch/mips/loongson64/loongson-3/smp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/mips/loongson64/loongson-3/smp.c b/arch/mips/loongson64/loongson-3/smp.c
index bde64b0f1e47..8501109bb0f0 100644
--- a/arch/mips/loongson64/loongson-3/smp.c
+++ b/arch/mips/loongson64/loongson-3/smp.c
@@ -400,7 +400,7 @@ static void __init loongson3_prepare_cpus(unsigned int max_cpus)
/*
* Setup the PC, SP, and GP of a secondary processor and start it runing!
*/
-static void loongson3_boot_secondary(int cpu, struct task_struct *idle)
+static int loongson3_boot_secondary(int cpu, struct task_struct *idle)
{
unsigned long startargs[4];
@@ -423,6 +423,7 @@ static void loongson3_boot_secondary(int cpu, struct task_struct *idle)
(void *)(ipi_mailbox_buf[cpu_logical_map(cpu)]+0x8));
loongson3_ipi_write64(startargs[0],
(void *)(ipi_mailbox_buf[cpu_logical_map(cpu)]+0x0));
+ return 0;
}
#ifdef CONFIG_HOTPLUG_CPU