diff options
author | Li Shaohua <shaohua.li@intel.com> | 2005-06-25 14:54:56 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-25 16:24:30 -0700 |
commit | e1367daf3eed5cd619ee88c9907e1e6ddaa58406 (patch) | |
tree | dce60efefba356e0a914669587586a6174e41b94 /drivers/base | |
parent | 0bb3184df537002a742bafddf3f4fb482b7fe610 (diff) | |
download | linux-e1367daf3eed5cd619ee88c9907e1e6ddaa58406.tar.bz2 |
[PATCH] cpu state clean after hot remove
Clean CPU states in order to reuse smp boot code for CPU hotplug.
Signed-off-by: Li Shaohua<shaohua.li@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/cpu.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index 6ef3069b5710..bdd7e9f55c81 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c @@ -16,6 +16,10 @@ struct sysdev_class cpu_sysdev_class = { EXPORT_SYMBOL(cpu_sysdev_class); #ifdef CONFIG_HOTPLUG_CPU +#ifndef __HAVE_ARCH_SMP_PREPARE_CPU +#define smp_prepare_cpu(cpu) (0) +#endif + static ssize_t show_online(struct sys_device *dev, char *buf) { struct cpu *cpu = container_of(dev, struct cpu, sysdev); @@ -36,7 +40,9 @@ static ssize_t store_online(struct sys_device *dev, const char *buf, kobject_hotplug(&dev->kobj, KOBJ_OFFLINE); break; case '1': - ret = cpu_up(cpu->sysdev.id); + ret = smp_prepare_cpu(cpu->sysdev.id); + if (ret == 0) + ret = cpu_up(cpu->sysdev.id); break; default: ret = -EINVAL; |