X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fppc64%2Fkernel%2Fsmp.c;h=5875c4b0edc757507a9eda52719316e0cb90bbf8;hb=5020cac828f9f6c98a685598599a1dc798712005;hp=5cf39f3e87510806eff8670efbe90f7146f46f3a;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/arch/ppc64/kernel/smp.c b/arch/ppc64/kernel/smp.c index 5cf39f3e8..5875c4b0e 100644 --- a/arch/ppc64/kernel/smp.c +++ b/arch/ppc64/kernel/smp.c @@ -300,10 +300,6 @@ void __cpu_die(unsigned int cpu) void cpu_die(void) { local_irq_disable(); - /* Some hardware requires clearing the CPPR, while other hardware does not - * it is safe either way - */ - pSeriesLP_cppr_info(0, 0); rtas_stop_self(); /* Should never get here... */ BUG(); @@ -389,6 +385,8 @@ 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; + /* Fixup SLB round-robin so next segment (kernel) goes in segment 0 */ + paca[lcpu].stab_next_rr = 0; /* At boot this is done in prom.c. */ paca[lcpu].hw_cpu_id = pcpu; @@ -424,11 +422,7 @@ static inline void look_for_more_cpus(void) } maxcpus = ireg[num_addr_cell + num_size_cell]; - - /* Double maxcpus for processors which have SMT capability */ - if (cur_cpu_spec->cpu_features & CPU_FTR_SMT) - maxcpus *= 2; - + /* DRENG need to account for threads here too */ if (maxcpus > NR_CPUS) { printk(KERN_WARNING @@ -721,7 +715,7 @@ int smp_call_function (void (*func) (void *info), void *info, int nonatomic, printk("smp_call_function on cpu %d: other cpus not " "responding (%d)\n", smp_processor_id(), atomic_read(&data.started)); - debugger(NULL); + debugger(0); goto out; } } @@ -736,7 +730,7 @@ int smp_call_function (void (*func) (void *info), void *info, int nonatomic, smp_processor_id(), atomic_read(&data.finished), atomic_read(&data.started)); - debugger(NULL); + debugger(0); goto out; } } @@ -935,11 +929,7 @@ int __devinit __cpu_up(unsigned int cpu) if (smp_ops->give_timebase) smp_ops->give_timebase(); - - /* Wait until cpu puts itself in the online map */ - while (!cpu_online(cpu)) - cpu_relax(); - + cpu_set(cpu, cpu_online_map); return 0; } @@ -975,10 +965,6 @@ int __devinit start_secondary(void *unused) #endif #endif - spin_lock(&call_lock); - cpu_set(cpu, cpu_online_map); - spin_unlock(&call_lock); - local_irq_enable(); return cpu_idle(NULL);