diff options
author | Jeff Garzik <jgarzik@pretzel.yyz.us> | 2005-06-26 18:06:06 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-06-26 18:06:06 -0400 |
commit | aef7b83c92dd0b7e994805440655d1d64147287b (patch) | |
tree | 981f373358c1988e061625e8f272013065cb086f /drivers/base/cpu.c | |
parent | b1fc5505e0dbcc3fd7c75bfe6bee39ec50080963 (diff) | |
parent | 8678887e7fb43cd6c9be6c9807b05e77848e0920 (diff) |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'drivers/base/cpu.c')
-rw-r--r-- | drivers/base/cpu.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index 6ef3069b571..b79badd0f15 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c @@ -16,6 +16,11 @@ struct sysdev_class cpu_sysdev_class = { EXPORT_SYMBOL(cpu_sysdev_class); #ifdef CONFIG_HOTPLUG_CPU +int __attribute__((weak)) smp_prepare_cpu (int cpu) +{ + return 0; +} + static ssize_t show_online(struct sys_device *dev, char *buf) { struct cpu *cpu = container_of(dev, struct cpu, sysdev); @@ -36,7 +41,11 @@ 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) + ret = cpu_up(cpu->sysdev.id); + if (!ret) + kobject_hotplug(&dev->kobj, KOBJ_ONLINE); break; default: ret = -EINVAL; |