diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-12 08:33:53 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-12 08:33:53 -0700 |
commit | 26cda988ba1e3e843a0680fe98661a22fa430a60 (patch) | |
tree | 692e76e9bc9b11ed34bad88f892adc0184c2e5ff /arch/ppc64/kernel/pSeries_smp.c | |
parent | 1df5c10a5b40d1ad747e3de3caf28764153c5c8e (diff) | |
parent | 2d909d08db7655a53f3afb31c7627c5c8c87142a (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/paulus/ppc64-2.6
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 79c7f322366..d2c7e2c4733 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) unsigned long start_here = __pa((u32)*((unsigned long *) pSeries_secondary_smp_init)); unsigned int pcpu; + int start_cpu; if (cpu_isset(lcpu, of_spin_map)) /* Already started by OF and sitting in spin loop */ @@ -282,12 +283,20 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu) /* Fixup atomic count: it exited inside IRQ handler. */ paca[lcpu].__current->thread_info->preempt_count = 0; - status = rtas_call(rtas_token("start-cpu"), 3, 1, NULL, - pcpu, start_here, lcpu); + /* + * If the RTAS start-cpu token does not exist then presume the + * cpu is already spinning. + */ + start_cpu = rtas_token("start-cpu"); + if (start_cpu == RTAS_UNKNOWN_SERVICE) + return 1; + + status = rtas_call(start_cpu, 3, 1, NULL, pcpu, start_here, lcpu); if (status != 0) { printk(KERN_ERR "start-cpu failed: %i\n", status); return 0; } + return 1; } |