diff options
Diffstat (limited to 'arch/ppc64/kernel/pSeries_smp.c')
-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 | ||