diff options
author | Ashok Raj <ashok.raj@intel.com> | 2005-06-25 17:54:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-25 19:24:30 -0400 |
commit | 52a119feaad92d44a0e97d01b22afbcbaf3fc079 (patch) | |
tree | d6ad98d25a0c4a3189af2ad960fe2f47d3eb00f1 /include | |
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 'include')
-rw-r--r-- | include/asm-i386/smp.h | 3 | ||||
-rw-r--r-- | include/linux/cpu.h | 1 |
2 files changed, 1 insertions, 3 deletions
diff --git a/include/asm-i386/smp.h b/include/asm-i386/smp.h index c9996eda5408..edad9b4712fa 100644 --- a/include/asm-i386/smp.h +++ b/include/asm-i386/smp.h | |||
@@ -51,9 +51,6 @@ extern u8 x86_cpu_to_apicid[]; | |||
51 | #ifdef CONFIG_HOTPLUG_CPU | 51 | #ifdef CONFIG_HOTPLUG_CPU |
52 | extern void cpu_exit_clear(void); | 52 | extern void cpu_exit_clear(void); |
53 | extern void cpu_uninit(void); | 53 | extern void cpu_uninit(void); |
54 | |||
55 | #define __HAVE_ARCH_SMP_PREPARE_CPU | ||
56 | extern int smp_prepare_cpu(int cpu); | ||
57 | #endif | 54 | #endif |
58 | 55 | ||
59 | /* | 56 | /* |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index fe0298e5dae1..e8904c0da686 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -69,6 +69,7 @@ extern struct semaphore cpucontrol; | |||
69 | register_cpu_notifier(&fn##_nb); \ | 69 | register_cpu_notifier(&fn##_nb); \ |
70 | } | 70 | } |
71 | int cpu_down(unsigned int cpu); | 71 | int cpu_down(unsigned int cpu); |
72 | extern int __attribute__((weak)) smp_prepare_cpu(int cpu); | ||
72 | #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) | 73 | #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) |
73 | #else | 74 | #else |
74 | #define lock_cpu_hotplug() do { } while (0) | 75 | #define lock_cpu_hotplug() do { } while (0) |