diff options
author | Michael Ellerman <michael@ozlabs.org> | 2011-04-11 17:46:19 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-04-20 03:01:18 -0400 |
commit | de300974761d92f71cb583730ac9e1d4eb1b7156 (patch) | |
tree | bfce8daf1dec8dff5af215bcf7647f38632490d4 /arch/powerpc/platforms/chrp | |
parent | 6c5b59b913874cae535a324a671b7ed4f17e6397 (diff) |
powerpc/smp: smp_ops->kick_cpu() should be able to fail
When we start a cpu we use smp_ops->kick_cpu(), which currently
returns void, it should be able to fail. Convert it to return
int, and update all uses.
Convert all the current error cases to return -ENOENT, which is
what would eventually be returned by __cpu_up() currently when
it doesn't detect the cpu as coming up in time.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/chrp')
-rw-r--r-- | arch/powerpc/platforms/chrp/smp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/chrp/smp.c b/arch/powerpc/platforms/chrp/smp.c index 02cafecc90e3..a800122e4dda 100644 --- a/arch/powerpc/platforms/chrp/smp.c +++ b/arch/powerpc/platforms/chrp/smp.c | |||
@@ -30,10 +30,12 @@ | |||
30 | #include <asm/mpic.h> | 30 | #include <asm/mpic.h> |
31 | #include <asm/rtas.h> | 31 | #include <asm/rtas.h> |
32 | 32 | ||
33 | static void __devinit smp_chrp_kick_cpu(int nr) | 33 | static int __devinit smp_chrp_kick_cpu(int nr) |
34 | { | 34 | { |
35 | *(unsigned long *)KERNELBASE = nr; | 35 | *(unsigned long *)KERNELBASE = nr; |
36 | asm volatile("dcbf 0,%0"::"r"(KERNELBASE):"memory"); | 36 | asm volatile("dcbf 0,%0"::"r"(KERNELBASE):"memory"); |
37 | |||
38 | return 0; | ||
37 | } | 39 | } |
38 | 40 | ||
39 | static void __devinit smp_chrp_setup_cpu(int cpu_nr) | 41 | static void __devinit smp_chrp_setup_cpu(int cpu_nr) |