17 #include <linux/kernel.h>
18 #include <linux/sched.h>
26 #include <linux/device.h>
29 #include <asm/ptrace.h>
33 #include <asm/pgtable.h>
38 #include <asm/machdep.h>
39 #include <asm/cputable.h>
48 #define DBG(fmt...) udbg_printf(fmt)
70 static inline int __devinit smp_startup_cpu(
unsigned int lcpu)
73 unsigned long start_here =
__pa((
u32)*((
unsigned long *)
74 generic_secondary_smp_init));
82 pcpu = get_hard_smp_processor_id(lcpu);
92 if (start_cpu == RTAS_UNKNOWN_SERVICE)
95 status =
rtas_call(start_cpu, 3, 1,
NULL, pcpu, start_here, lcpu);
104 static int __init smp_iic_probe(
void)
108 return cpumask_weight(cpu_possible_mask);
119 mtspr(SPRN_DABRX, DABRX_KERNEL | DABRX_USER);
126 if (!smp_startup_cpu(nr))
139 static int smp_cell_cpu_bootable(
unsigned int nr)
152 static struct smp_ops_t bpa_iic_smp_ops = {
153 .message_pass = iic_message_pass,
154 .probe = smp_iic_probe,
155 .kick_cpu = smp_cell_kick_cpu,
156 .setup_cpu = smp_cell_setup_cpu,
157 .cpu_bootable = smp_cell_cpu_bootable,
165 DBG(
" -> smp_init_cell()\n");
172 if (cpu_thread_in_core(i) == 0)
173 cpumask_set_cpu(i, &of_spin_map);
181 if (
rtas_token(
"freeze-time-base") != RTAS_UNKNOWN_SERVICE) {
186 DBG(
" <- smp_init_cell()\n");