diff options
author | Anton Blanchard <anton@samba.org> | 2005-09-11 23:17:27 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-09-12 03:19:12 -0400 |
commit | 1ed2fd2d3a8d18f184ba2d06e0f03bff773f28ab (patch) | |
tree | 90cbf7cca4fc3c4367327c8503cede449ee64ffb /arch/ppc64 | |
parent | 3238e9c9735cd5ebe30a59df1f8f5af2687344de (diff) |
[PATCH] ppc64: Fix for missing start-cpu rtas token
If the rtas start-cpu token doesnt exist then presume the cpu is already
spinning. If it isnt we will catch it later on when the cpu doesnt
respond.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc64')
-rw-r--r-- | arch/ppc64/kernel/pSeries_smp.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/ppc64/kernel/pSeries_smp.c b/arch/ppc64/kernel/pSeries_smp.c index 79c7f3223665..d2c7e2c4733b 100644 --- a/arch/ppc64/kernel/pSeries_smp.c +++ b/arch/ppc64/kernel/pSeries_smp.c | |||
@@ -272,6 +272,7 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu) | |||
272 | unsigned long start_here = __pa((u32)*((unsigned long *) | 272 | unsigned long start_here = __pa((u32)*((unsigned long *) |
273 | pSeries_secondary_smp_init)); | 273 | pSeries_secondary_smp_init)); |
274 | unsigned int pcpu; | 274 | unsigned int pcpu; |
275 | int start_cpu; | ||
275 | 276 | ||
276 | if (cpu_isset(lcpu, of_spin_map)) | 277 | if (cpu_isset(lcpu, of_spin_map)) |
277 | /* Already started by OF and sitting in spin loop */ | 278 | /* Already started by OF and sitting in spin loop */ |
@@ -282,12 +283,20 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu) | |||
282 | /* Fixup atomic count: it exited inside IRQ handler. */ | 283 | /* Fixup atomic count: it exited inside IRQ handler. */ |
283 | paca[lcpu].__current->thread_info->preempt_count = 0; | 284 | paca[lcpu].__current->thread_info->preempt_count = 0; |
284 | 285 | ||
285 | status = rtas_call(rtas_token("start-cpu"), 3, 1, NULL, | 286 | /* |
286 | pcpu, start_here, lcpu); | 287 | * If the RTAS start-cpu token does not exist then presume the |
288 | * cpu is already spinning. | ||
289 | */ | ||
290 | start_cpu = rtas_token("start-cpu"); | ||
291 | if (start_cpu == RTAS_UNKNOWN_SERVICE) | ||
292 | return 1; | ||
293 | |||
294 | status = rtas_call(start_cpu, 3, 1, NULL, pcpu, start_here, lcpu); | ||
287 | if (status != 0) { | 295 | if (status != 0) { |
288 | printk(KERN_ERR "start-cpu failed: %i\n", status); | 296 | printk(KERN_ERR "start-cpu failed: %i\n", status); |
289 | return 0; | 297 | return 0; |
290 | } | 298 | } |
299 | |||
291 | return 1; | 300 | return 1; |
292 | } | 301 | } |
293 | 302 | ||