* [PATCH] ppc64: Fix CPU hot unplug deadlock
@ 2004-04-18 5:38 Benjamin Herrenschmidt
0 siblings, 0 replies; only message in thread
From: Benjamin Herrenschmidt @ 2004-04-18 5:38 UTC (permalink / raw)
To: Andrew Morton; +Cc: Linus Torvalds, Linux Kernel list
Hi !
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
--- linux-2.5/arch/ppc64/kernel/rtas.c 2004-04-17 12:39:03.253986984 +1000
+++ ppc64-linux-2.5/arch/ppc64/kernel/rtas.c 2004-04-18 15:35:41.871029480 +1000
@@ -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);
+
rtas_args->token = rtas_token("stop-self");
BUG_ON(rtas_args->token == RTAS_UNKNOWN_SERVICE);
rtas_args->nargs = 0;
@@ -516,7 +516,6 @@
printk("%u %u Ready to die...\n",
smp_processor_id(), hard_smp_processor_id());
enter_rtas((void *)__pa(rtas_args));
- spin_unlock_irqrestore(&rtas.lock, s);
panic("Alas, I survived.\n");
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-04-18 5:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-18 5:38 [PATCH] ppc64: Fix CPU hot unplug deadlock Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®