summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/smp.c
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ozlabs.org>2011-04-11 23:46:19 +0200
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-04-20 09:01:18 +0200
commitde300974761d92f71cb583730ac9e1d4eb1b7156 (patch)
treebfce8daf1dec8dff5af215bcf7647f38632490d4 /arch/powerpc/platforms/pseries/smp.c
parentpowerpc/boot: Add an ePAPR compliant boot wrapper (diff)
downloadlinux-de300974761d92f71cb583730ac9e1d4eb1b7156.tar.xz
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/pseries/smp.c')
-rw-r--r--arch/powerpc/platforms/pseries/smp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index fc72bfce7320..95f578158ff0 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -152,12 +152,12 @@ static void __devinit smp_xics_setup_cpu(int cpu)
#endif
}
-static void __devinit smp_pSeries_kick_cpu(int nr)
+static int __devinit smp_pSeries_kick_cpu(int nr)
{
BUG_ON(nr < 0 || nr >= NR_CPUS);
if (!smp_startup_cpu(nr))
- return;
+ return -ENOENT;
/*
* The processor is currently spinning, waiting for the
@@ -179,6 +179,8 @@ static void __devinit smp_pSeries_kick_cpu(int nr)
"Ret= %ld\n", nr, rc);
}
#endif
+
+ return 0;
}
static int smp_pSeries_cpu_bootable(unsigned int nr)