diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2009-06-23 05:00:31 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-06-24 13:34:40 -0400 |
commit | 1b2bc75c1bde6581d2694cb3ed7fb06b69685008 (patch) | |
tree | 800fc23052bccb1fbf8acfbaabbf5648c69daa9e /arch/mips/kernel/topology.c | |
parent | 4ac4aa5cc3b00cc558575065ae71043e92d1a69a (diff) |
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>
Diffstat (limited to 'arch/mips/kernel/topology.c')
-rw-r--r-- | arch/mips/kernel/topology.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/mips/kernel/topology.c b/arch/mips/kernel/topology.c index 660e44ed44d7..cf3eb61fad12 100644 --- a/arch/mips/kernel/topology.c +++ b/arch/mips/kernel/topology.c | |||
@@ -17,7 +17,10 @@ static int __init topology_init(void) | |||
17 | #endif /* CONFIG_NUMA */ | 17 | #endif /* CONFIG_NUMA */ |
18 | 18 | ||
19 | for_each_present_cpu(i) { | 19 | for_each_present_cpu(i) { |
20 | ret = register_cpu(&per_cpu(cpu_devices, i), i); | 20 | struct cpu *c = &per_cpu(cpu_devices, i); |
21 | |||
22 | c->hotpluggable = 1; | ||
23 | ret = register_cpu(c, i); | ||
21 | if (ret) | 24 | if (ret) |
22 | printk(KERN_WARNING "topology_init: register_cpu %d " | 25 | printk(KERN_WARNING "topology_init: register_cpu %d " |
23 | "failed (%d)\n", i, ret); | 26 | "failed (%d)\n", i, ret); |