diff options
author | Ashok Raj | 2005-06-25 14:54:57 -0700 |
---|---|---|
committer | Linus Torvalds | 2005-06-25 16:24:30 -0700 |
commit | 52a119feaad92d44a0e97d01b22afbcbaf3fc079 (patch) | |
tree | d6ad98d25a0c4a3189af2ad960fe2f47d3eb00f1 /drivers/base | |
parent | e1367daf3eed5cd619ee88c9907e1e6ddaa58406 (diff) |
[PATCH] make smp_prepare_cpu to a weak function
I really wish smp_prepare_cpu() would disappear eventually. In the interim
this is ideally a weak function, so we dont end up changing several places
to define this dummy in headers.
Today since the dummy declaration is done only in drivers/base/cpu.c but
the function is called in kernel/power/smp.c i get undefined reference in
my cpu hotplug code for x86_64 under development.
Signed-off-by: Ashok Raj <ashok.raj@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 | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index bdd7e9f55c81..0bf2dc11cdb8 100644 --- a/drivers/base/cpu.c +++ b/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: |