summaryrefslogtreecommitdiffstats
path: root/include/asm-x86_64
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@suse.de>2006-07-01 04:36:18 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-01 09:56:02 -0700
commit8ec4d41f88872e6a5980558e362c0174dce54e40 (patch)
treef02eaf6b61832ded30bc19bd8e5d8494d91f8bc6 /include/asm-x86_64
parent27b678dd04a636f2c351816f4b3042c8815d4e9d (diff)
downloadlinux-8ec4d41f88872e6a5980558e362c0174dce54e40.tar.bz2
[PATCH] SMP alternatives: skip with UP kernels
Hide the magic in alternative.h and provide some dummy inline functions for the UP case (gcc should manage to optimize away these calls). No changes in module.c. Cc: Dave Jones <davej@codemonkey.org.uk> Cc: Andi Kleen <ak@muc.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-x86_64')
-rw-r--r--include/asm-x86_64/alternative.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asm-x86_64/alternative.h b/include/asm-x86_64/alternative.h
index 387c8f66af7d..aa67bfd1b3ce 100644
--- a/include/asm-x86_64/alternative.h
+++ b/include/asm-x86_64/alternative.h
@@ -17,11 +17,20 @@ struct alt_instr {
extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end);
struct module;
+
+#ifdef CONFIG_SMP
extern void alternatives_smp_module_add(struct module *mod, char *name,
void *locks, void *locks_end,
void *text, void *text_end);
extern void alternatives_smp_module_del(struct module *mod);
extern void alternatives_smp_switch(int smp);
+#else
+static inline void alternatives_smp_module_add(struct module *mod, char *name,
+ void *locks, void *locks_end,
+ void *text, void *text_end) {}
+static inline void alternatives_smp_module_del(struct module *mod) {}
+static inline void alternatives_smp_switch(int smp) {}
+#endif
#endif