Skip to content

Commit d1dedb5

Browse files
author
Ingo Molnar
committed
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>
1 parent ffd71da commit d1dedb5

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎include/linux/smp.h‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ int smp_call_function_single(int cpuid, void (*func) (void *info), void *info,
3838
/*
3939
* main cross-CPU interfaces, handles INIT, TLB flush, STOP, etc.
4040
* (defined in asm header):
41-
*/
41+
*/
4242

4343
/*
4444
* stops all CPUs but the current one:
@@ -122,6 +122,8 @@ extern unsigned int setup_max_cpus;
122122

123123
#else /* !SMP */
124124

125+
static inline void smp_send_stop(void) { }
126+
125127
/*
126128
* These macros fold the SMP functionality into a single CPU system
127129
*/

‎kernel/panic.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,12 @@ NORET_TYPE void panic(const char * fmt, ...)
8585
*/
8686
crash_kexec(NULL);
8787

88-
#ifdef CONFIG_SMP
8988
/*
9089
* Note smp_send_stop is the usual smp shutdown function, which
9190
* unfortunately means it may not be hardened to work in a panic
9291
* situation.
9392
*/
9493
smp_send_stop();
95-
#endif
9694

9795
atomic_notifier_call_chain(&panic_notifier_list, 0, buf);
9896

0 commit comments

Comments
 (0)