diff --git a/[refs] b/[refs] index 47f19bbb5837..a5e2d52a221d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e1367daf3eed5cd619ee88c9907e1e6ddaa58406 +refs/heads/master: 52a119feaad92d44a0e97d01b22afbcbaf3fc079 diff --git a/trunk/drivers/base/cpu.c b/trunk/drivers/base/cpu.c index bdd7e9f55c81..0bf2dc11cdb8 100644 --- a/trunk/drivers/base/cpu.c +++ b/trunk/drivers/base/cpu.c @@ -16,9 +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 +int __attribute__((weak)) smp_prepare_cpu (int cpu) +{ + return 0; +} static ssize_t show_online(struct sys_device *dev, char *buf) { @@ -41,7 +42,7 @@ static ssize_t store_online(struct sys_device *dev, const char *buf, break; case '1': ret = smp_prepare_cpu(cpu->sysdev.id); - if (ret == 0) + if (!ret) ret = cpu_up(cpu->sysdev.id); break; default: diff --git a/trunk/include/asm-i386/smp.h b/trunk/include/asm-i386/smp.h index c9996eda5408..edad9b4712fa 100644 --- a/trunk/include/asm-i386/smp.h +++ b/trunk/include/asm-i386/smp.h @@ -51,9 +51,6 @@ extern u8 x86_cpu_to_apicid[]; #ifdef CONFIG_HOTPLUG_CPU extern void cpu_exit_clear(void); extern void cpu_uninit(void); - -#define __HAVE_ARCH_SMP_PREPARE_CPU -extern int smp_prepare_cpu(int cpu); #endif /* diff --git a/trunk/include/linux/cpu.h b/trunk/include/linux/cpu.h index fe0298e5dae1..e8904c0da686 100644 --- a/trunk/include/linux/cpu.h +++ b/trunk/include/linux/cpu.h @@ -69,6 +69,7 @@ extern struct semaphore cpucontrol; register_cpu_notifier(&fn##_nb); \ } int cpu_down(unsigned int cpu); +extern int __attribute__((weak)) smp_prepare_cpu(int cpu); #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) #else #define lock_cpu_hotplug() do { } while (0)