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/cell | |
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/cell')
-rw-r--r-- | arch/powerpc/platforms/cell/beat_smp.c | 5 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/smp.c | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/arch/powerpc/platforms/cell/beat_smp.c b/arch/powerpc/platforms/cell/beat_smp.c index 26efc204c47f..996df33165f1 100644 --- a/arch/powerpc/platforms/cell/beat_smp.c +++ b/arch/powerpc/platforms/cell/beat_smp.c | |||
@@ -93,12 +93,11 @@ static void __devinit smp_beatic_setup_cpu(int cpu) | |||
93 | beatic_setup_cpu(cpu); | 93 | beatic_setup_cpu(cpu); |
94 | } | 94 | } |
95 | 95 | ||
96 | static void __devinit smp_celleb_kick_cpu(int nr) | 96 | static int __devinit smp_celleb_kick_cpu(int nr) |
97 | { | 97 | { |
98 | BUG_ON(nr < 0 || nr >= NR_CPUS); | 98 | BUG_ON(nr < 0 || nr >= NR_CPUS); |
99 | 99 | ||
100 | if (!smp_startup_cpu(nr)) | 100 | return smp_startup_cpu(nr); |
101 | return; | ||
102 | } | 101 | } |
103 | 102 | ||
104 | static int smp_celleb_cpu_bootable(unsigned int nr) | 103 | static int smp_celleb_cpu_bootable(unsigned int nr) |
diff --git a/arch/powerpc/platforms/cell/smp.c b/arch/powerpc/platforms/cell/smp.c index f774530075b7..03d638e2f44f 100644 --- a/arch/powerpc/platforms/cell/smp.c +++ b/arch/powerpc/platforms/cell/smp.c | |||
@@ -137,12 +137,12 @@ static void __devinit smp_cell_setup_cpu(int cpu) | |||
137 | mtspr(SPRN_DABRX, DABRX_KERNEL | DABRX_USER); | 137 | mtspr(SPRN_DABRX, DABRX_KERNEL | DABRX_USER); |
138 | } | 138 | } |
139 | 139 | ||
140 | static void __devinit smp_cell_kick_cpu(int nr) | 140 | static int __devinit smp_cell_kick_cpu(int nr) |
141 | { | 141 | { |
142 | BUG_ON(nr < 0 || nr >= NR_CPUS); | 142 | BUG_ON(nr < 0 || nr >= NR_CPUS); |
143 | 143 | ||
144 | if (!smp_startup_cpu(nr)) | 144 | if (!smp_startup_cpu(nr)) |
145 | return; | 145 | return -ENOENT; |
146 | 146 | ||
147 | /* | 147 | /* |
148 | * The processor is currently spinning, waiting for the | 148 | * The processor is currently spinning, waiting for the |
@@ -150,6 +150,8 @@ static void __devinit smp_cell_kick_cpu(int nr) | |||
150 | * the processor will continue on to secondary_start | 150 | * the processor will continue on to secondary_start |
151 | */ | 151 | */ |
152 | paca[nr].cpu_start = 1; | 152 | paca[nr].cpu_start = 1; |
153 | |||
154 | return 0; | ||
153 | } | 155 | } |
154 | 156 | ||
155 | static int smp_cell_cpu_bootable(unsigned int nr) | 157 | static int smp_cell_cpu_bootable(unsigned int nr) |