Commit d1dedb52acd98bd5e13e1ff4c4d045d58bbd16fe
1 parent
ffd71da4e3
Exists in
master
and in
4 other branches
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>
Showing 2 changed files with 3 additions and 3 deletions Side-by-side Diff
include/linux/smp.h
... | ... | @@ -38,7 +38,7 @@ |
38 | 38 | /* |
39 | 39 | * main cross-CPU interfaces, handles INIT, TLB flush, STOP, etc. |
40 | 40 | * (defined in asm header): |
41 | - */ | |
41 | + */ | |
42 | 42 | |
43 | 43 | /* |
44 | 44 | * stops all CPUs but the current one: |
... | ... | @@ -121,6 +121,8 @@ |
121 | 121 | extern unsigned int setup_max_cpus; |
122 | 122 | |
123 | 123 | #else /* !SMP */ |
124 | + | |
125 | +static inline void smp_send_stop(void) { } | |
124 | 126 | |
125 | 127 | /* |
126 | 128 | * These macros fold the SMP functionality into a single CPU system |
kernel/panic.c
... | ... | @@ -85,14 +85,12 @@ |
85 | 85 | */ |
86 | 86 | crash_kexec(NULL); |
87 | 87 | |
88 | -#ifdef CONFIG_SMP | |
89 | 88 | /* |
90 | 89 | * Note smp_send_stop is the usual smp shutdown function, which |
91 | 90 | * unfortunately means it may not be hardened to work in a panic |
92 | 91 | * situation. |
93 | 92 | */ |
94 | 93 | smp_send_stop(); |
95 | -#endif | |
96 | 94 | |
97 | 95 | atomic_notifier_call_chain(&panic_notifier_list, 0, buf); |
98 | 96 |