int __devinit smp_a2_kick_cpu(int nr) { const char *enable_method; struct device_node *np; int thr_idx; if (nr < 0 || nr >= NR_CPUS) return -ENOENT; np = of_get_cpu_node(nr, &thr_idx); if (!np) return -ENODEV; enable_method = of_get_property(np, "enable-method", NULL); pr_devel("CPU%d has enable-method: \"%s\"\n", nr, enable_method); if (!enable_method) { printk(KERN_ERR "CPU%d has no enable-method\n", nr); return -ENOENT; } else if (strcmp(enable_method, "ibm,a2-scom") == 0) { if (a2_scom_startup_cpu(nr, thr_idx, np)) return -1; } else { printk(KERN_ERR "CPU%d: Don't understand enable-method \"%s\"\n", nr, enable_method); return -EINVAL; } paca[nr].cpu_start = 1; return 0; }
int __devinit smp_a2_kick_cpu(int nr) { const char *enable_method; struct device_node *np; int thr_idx; if (nr < 0 || nr >= NR_CPUS) return -ENOENT; np = of_get_cpu_node(nr, &thr_idx); if (!np) return -ENODEV; enable_method = of_get_property(np, "enable-method", NULL); pr_devel("CPU%d has enable-method: \"%s\"\n", nr, enable_method); if (!enable_method) { printk(KERN_ERR "CPU%d has no enable-method\n", nr); return -ENOENT; } else if (strcmp(enable_method, "ibm,a2-scom") == 0) { if (a2_scom_startup_cpu(nr, thr_idx, np)) return -1; } else { printk(KERN_ERR "CPU%d: Don't understand enable-method \"%s\"\n", nr, enable_method); return -EINVAL; } /* * The processor is currently spinning, waiting for the * cpu_start field to become non-zero After we set cpu_start, * the processor will continue on to secondary_start */ paca[nr].cpu_start = 1; return 0; }