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();
/* 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;
}
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
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;
}
}
smp_processor_id(),
atomic_read(&data.finished),
atomic_read(&data.started));
- debugger(NULL);
+ debugger(0);
goto out;
}
}
return ret;
}
+EXPORT_SYMBOL_GPL(smp_call_function);
+
void smp_call_function_interrupt(void)
{
void (*func) (void *info);
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;
}
#endif
#endif
- spin_lock(&call_lock);
- cpu_set(cpu, cpu_online_map);
- spin_unlock(&call_lock);
-
local_irq_enable();
return cpu_idle(NULL);