panic, smp: provide smp_send_stop() wrapper on UP too

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, April 3, 2009 - 6:04 pm

Gitweb:     http://git.kernel.org/linus/d1dedb52acd98bd5e13e1ff4c4d045d58bbd16fe
Commit:     d1dedb52acd98bd5e13e1ff4c4d045d58bbd16fe
Parent:     ffd71da4e3f323b7673b061e6f7e0d0c12dc2b49
Author:     Ingo Molnar <mingo@elte.hu>
AuthorDate: Fri Mar 13 11:14:06 2009 +0100
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Fri Mar 13 11:24:31 2009 +0100

    panic, smp: provide smp_send_stop() wrapper on UP too
    
    Impact: cleanup, no code changed
    
    Remove an ugly #ifdef CONFIG_SMP from panic(), by providing
    an smp_send_stop() wrapper on UP too.
    
    LKML-Reference: <49B91A7E.76E4.0078.0@novell.com>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 include/linux/smp.h |    4 +++-
 kernel/panic.c      |    2 --
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/smp.h b/include/linux/smp.h
index 2d3bcb6..a69db82 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -38,7 +38,7 @@ int smp_call_function_single(int cpuid, void (*func) (void *info), void *info,
 /*
  * main cross-CPU interfaces, handles INIT, TLB flush, STOP, etc.
  * (defined in asm header):
- */ 
+ */
 
 /*
  * stops all CPUs but the current one:
@@ -122,6 +122,8 @@ extern unsigned int setup_max_cpus;
 
 #else /* !SMP */
 
+static inline void smp_send_stop(void) { }
+
 /*
  *	These macros fold the SMP functionality into a single CPU system
  */
diff --git a/kernel/panic.c b/kernel/panic.c
index 57fb005..ca75e81 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -85,14 +85,12 @@ NORET_TYPE void panic(const char * fmt, ...)
 	 */
 	crash_kexec(NULL);
 
-#ifdef CONFIG_SMP
 	/*
 	 * Note smp_send_stop is the usual smp shutdown function, which
 	 * unfortunately means it may not be hardened to work in a panic
 	 * situation.
 	 */
 	smp_send_stop();
-#endif
 
 	atomic_notifier_call_chain(&panic_notifier_list, 0, buf);
 
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
panic, smp: provide smp_send_stop() wrapper on UP too, Linux Kernel Mailing ..., (Fri Apr 3, 6:04 pm)