Skip to contentSkip to conversation

ppc64: Fix CPU hot unplug deadlock]

PATCH Olaf Hering 2 participants 2 messages Apr 18, 2004 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 1082266724.2500.327.camel@gaston

#1 lore raw
Quoted 11 lines · Benjamin Herrenschmidt

My RTAS locking fixes incorrectly added a spinlock around the function used to stop a CPU, that function never returns, thus the lock becomes stale. The correct fix is to disable interrupts instead (the RTAS params beeing per-CPU, this should be safe enough)

Ben.

diff -urN linux-2.5/arch/ppc64/kernel/rtas.c ppc64-linux-2.5/arch/ppc64/kernel/rtas.c

arch/ppc64/kernel/rtas.c line 508

Quoted 7 lines
arch/ppc64/kernel/rtas.c +1 -2
@@ -504,9 +504,9 @@
 void rtas_stop_self(void)
 {
 	struct rtas_args *rtas_args = &(get_paca()->xRtas);
-	unsigned long s;
 
-	spin_lock_irqsave(&rtas.lock, s);
+	local_irq_disable(s);

did that compile ok for you?

Signature · 3 lines
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG
#2 lore raw
Quoted 11 lines
Quoted 11 lines

diff -urN linux-2.5/arch/ppc64/kernel/rtas.c ppc64-linux-2.5/arch/ppc64/kernel/rtas.c

arch/ppc64/kernel/rtas.c +0 -1
@@ -504,9 +504,9 @@
 void rtas_stop_self(void)
 {
 	struct rtas_args *rtas_args = &(get_paca()->xRtas);
-	unsigned long s;
 
Quoted 4 lines

arch/ppc64/kernel/rtas.c line 508

Quoted 2 lines
arch/ppc64/kernel/rtas.c +1 -1
-	spin_lock_irqsave(&rtas.lock, s);
+	local_irq_disable(s);

did that compile ok for you

Rah ! I sent the wrong one ! I'm really sick...

New fix on the way

Ben.