diff options
author | Michael Ellerman <michael@ozlabs.org> | 2011-04-11 21:46:19 +0000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-04-20 17:01:18 +1000 |
commit | de300974761d92f71cb583730ac9e1d4eb1b7156 (patch) | |
tree | bfce8daf1dec8dff5af215bcf7647f38632490d4 /arch/powerpc/platforms/86xx/mpc86xx_smp.c | |
parent | 6c5b59b913874cae535a324a671b7ed4f17e6397 (diff) | |
download | blackbird-obmc-linux-de300974761d92f71cb583730ac9e1d4eb1b7156.tar.gz blackbird-obmc-linux-de300974761d92f71cb583730ac9e1d4eb1b7156.zip |
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/86xx/mpc86xx_smp.c')
-rw-r--r-- | arch/powerpc/platforms/86xx/mpc86xx_smp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_smp.c b/arch/powerpc/platforms/86xx/mpc86xx_smp.c index eacea0e3fcc8..af09baee22cb 100644 --- a/arch/powerpc/platforms/86xx/mpc86xx_smp.c +++ b/arch/powerpc/platforms/86xx/mpc86xx_smp.c @@ -56,7 +56,7 @@ smp_86xx_release_core(int nr) } -static void __init +static int __init smp_86xx_kick_cpu(int nr) { unsigned int save_vector; @@ -65,7 +65,7 @@ smp_86xx_kick_cpu(int nr) unsigned int *vector = (unsigned int *)(KERNELBASE + 0x100); if (nr < 0 || nr >= NR_CPUS) - return; + return -ENOENT; pr_debug("smp_86xx_kick_cpu: kick CPU #%d\n", nr); @@ -92,6 +92,8 @@ smp_86xx_kick_cpu(int nr) local_irq_restore(flags); pr_debug("wait CPU #%d for %d msecs.\n", nr, n); + + return 0; } |