- smp-alternatives-skip-with-up-kernels.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     SMP alternatives: skip with UP kernels

has been removed from the -mm tree.  Its filename is

     smp-alternatives-skip-with-up-kernels.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: SMP alternatives: skip with UP kernels
From: Gerd Hoffmann <kraxel@xxxxxxx>

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@xxxxxxxxxxxxxxxxx>
Cc: Andi Kleen <ak@xxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/i386/kernel/alternative.c   |    6 ++++++
 include/asm-i386/alternative.h   |    8 ++++++++
 include/asm-x86_64/alternative.h |    9 +++++++++
 3 files changed, 23 insertions(+)

diff -puN arch/i386/kernel/alternative.c~smp-alternatives-skip-with-up-kernels arch/i386/kernel/alternative.c
--- a/arch/i386/kernel/alternative.c~smp-alternatives-skip-with-up-kernels
+++ a/arch/i386/kernel/alternative.c
@@ -168,6 +168,8 @@ void apply_alternatives(struct alt_instr
 	}
 }
 
+#ifdef CONFIG_SMP
+
 static void alternatives_smp_save(struct alt_instr *start, struct alt_instr *end)
 {
 	struct alt_instr *a;
@@ -328,6 +330,8 @@ void alternatives_smp_switch(int smp)
 	spin_unlock_irqrestore(&smp_alt, flags);
 }
 
+#endif
+
 void __init alternative_instructions(void)
 {
 	if (no_replacement) {
@@ -349,6 +353,7 @@ void __init alternative_instructions(voi
 	smp_alt_once = 1;
 #endif
 
+#ifdef CONFIG_SMP
 	if (smp_alt_once) {
 		if (1 == num_possible_cpus()) {
 			printk(KERN_INFO "SMP alternatives: switching to UP code\n");
@@ -370,4 +375,5 @@ void __init alternative_instructions(voi
 					    _text, _etext);
 		alternatives_smp_switch(0);
 	}
+#endif
 }
diff -puN include/asm-i386/alternative.h~smp-alternatives-skip-with-up-kernels include/asm-i386/alternative.h
--- a/include/asm-i386/alternative.h~smp-alternatives-skip-with-up-kernels
+++ a/include/asm-i386/alternative.h
@@ -19,11 +19,19 @@ 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
 
diff -puN include/asm-x86_64/alternative.h~smp-alternatives-skip-with-up-kernels include/asm-x86_64/alternative.h
--- a/include/asm-x86_64/alternative.h~smp-alternatives-skip-with-up-kernels
+++ a/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
 
_

Patches currently in -mm which might be from kraxel@xxxxxxx are

origin.patch
serial-fix-uart_bug_txen-test.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux