MIPS: Add arch generic CPU hotplug
Each platform has to add support for CPU hotplugging itself by providing suitable definitions for the cpu_disable and cpu_die of the smp_ops methods and setting SYS_SUPPORTS_HOTPLUG_CPU. A platform should only set SYS_SUPPORTS_HOTPLUG_CPU once all it's smp_ops definitions have the necessary changes. This patch contains the changes to the dummy smp_ops definition for uni-processor systems. Parts of the code contributed by Cavium Inc. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
@@ -17,7 +17,10 @@ static int __init topology_init(void)
|
||||
#endif /* CONFIG_NUMA */
|
||||
|
||||
for_each_present_cpu(i) {
|
||||
ret = register_cpu(&per_cpu(cpu_devices, i), i);
|
||||
struct cpu *c = &per_cpu(cpu_devices, i);
|
||||
|
||||
c->hotpluggable = 1;
|
||||
ret = register_cpu(c, i);
|
||||
if (ret)
|
||||
printk(KERN_WARNING "topology_init: register_cpu %d "
|
||||
"failed (%d)\n", i, ret);
|
||||
|
||||
Reference in New Issue
Block a user