diff options
author | Jeff Garzik <jgarzik@pretzel.yyz.us> | 2005-06-26 23:42:30 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-06-26 23:42:30 -0400 |
commit | f45727d52d1581e9ff4df9d1a12a60789ad2d1eb (patch) | |
tree | 773ae25f98542e6d382c688f7e85e8137d065614 /drivers/base/cpu.c | |
parent | 4c925f452cfd16c690209e96821ee094e09a2404 (diff) | |
parent | 5696c1944a33b4434a9a1ebb6383b906afd43a10 (diff) |
Merge /spare/repo/netdev-2.6/ branch 'ieee80211'
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; |