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/44x/iss4xx.c | |
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/44x/iss4xx.c')
-rw-r--r-- | arch/powerpc/platforms/44x/iss4xx.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/44x/iss4xx.c b/arch/powerpc/platforms/44x/iss4xx.c index aa46e9d1e771..19395f18b1db 100644 --- a/arch/powerpc/platforms/44x/iss4xx.c +++ b/arch/powerpc/platforms/44x/iss4xx.c | |||
@@ -87,7 +87,7 @@ static void __cpuinit smp_iss4xx_setup_cpu(int cpu) | |||
87 | mpic_setup_this_cpu(); | 87 | mpic_setup_this_cpu(); |
88 | } | 88 | } |
89 | 89 | ||
90 | static void __cpuinit smp_iss4xx_kick_cpu(int cpu) | 90 | static int __cpuinit smp_iss4xx_kick_cpu(int cpu) |
91 | { | 91 | { |
92 | struct device_node *cpunode = of_get_cpu_node(cpu, NULL); | 92 | struct device_node *cpunode = of_get_cpu_node(cpu, NULL); |
93 | const u64 *spin_table_addr_prop; | 93 | const u64 *spin_table_addr_prop; |
@@ -104,7 +104,7 @@ static void __cpuinit smp_iss4xx_kick_cpu(int cpu) | |||
104 | NULL); | 104 | NULL); |
105 | if (spin_table_addr_prop == NULL) { | 105 | if (spin_table_addr_prop == NULL) { |
106 | pr_err("CPU%d: Can't start, missing cpu-release-addr !\n", cpu); | 106 | pr_err("CPU%d: Can't start, missing cpu-release-addr !\n", cpu); |
107 | return; | 107 | return -ENOENT; |
108 | } | 108 | } |
109 | 109 | ||
110 | /* Assume it's mapped as part of the linear mapping. This is a bit | 110 | /* Assume it's mapped as part of the linear mapping. This is a bit |
@@ -117,6 +117,8 @@ static void __cpuinit smp_iss4xx_kick_cpu(int cpu) | |||
117 | smp_wmb(); | 117 | smp_wmb(); |
118 | spin_table[1] = __pa(start_secondary_47x); | 118 | spin_table[1] = __pa(start_secondary_47x); |
119 | mb(); | 119 | mb(); |
120 | |||
121 | return 0; | ||
120 | } | 122 | } |
121 | 123 | ||
122 | static struct smp_ops_t iss_smp_ops = { | 124 | static struct smp_ops_t iss_smp_ops = { |