Skip to contentSkip to conversation

conditionalize call from panic() to smp_send_stop()

PATCH In review Jan Beulich 2 participants 3 messages Jan 14, 2009 – Jan 15, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 conditionalize call from panic() to smp_send_stop()

... avoiding nested warnings and/or oopses as much as possible (namely durin early boot).

---
 kernel/panic.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/panic.c +2 -1
@@ -89,7 +89,8 @@ NORET_TYPE void panic(const char * fmt, 
 	 * unfortunately means it may not be hardened to work in a panic
 	 * situation.
 	 */
-	smp_send_stop();
+	if (num_online_cpus() > 1)
+		smp_send_stop();
 #endif
 
 	atomic_notifier_call_chain(&panic_notifier_list, 0, buf);
#1 lore raw
Quoted 2 lines · Jan Beulich

... avoiding nested warnings and/or oopses as much as possible (namely durin early boot).

Better would be to fix smp_send_stop than to work around it for this very limited case. I've been running into this with machine checks too. The new fancy smp_call_function() that is there now just doesn't work in any unusual situation like early boot or fatal exceptions,

My thinking was to use a separate vector, or possible just the NMI.

-Andi

Signature · 1 line
[email protected] -- Speaking for myself only.
#2 lore raw
Quoted 10 lines
Quoted 1 line
Quoted 1 line

Andi Kleen <[email protected]> 15.01.09 04:34 >>>

Quoted 2 lines · Jan Beulich

... avoiding nested warnings and/or oopses as much as possible (namely durin early boot).

Better would be to fix smp_send_stop than to work around it for this very limited case. I've been running into this with machine checks too. The new fancy smp_call_function() that is there now just doesn't work in any unusual situation like early boot or fatal exceptions,

Indeed - I wasn't used to smp_call_function...() to be generic functions that can be fixed for all architectures at once. I simply wanted to avoid needing individual changes in all architectures...

Jan