[PlanetCCRMA] Fwd: Re: [ANNOUNCE] 3.2.9-rt15

Fernando Lopez-Lezcano nando at ccrma.Stanford.EDU
Mon Mar 5 14:55:23 PST 2012

Re: the kernel panics on shutdown, I'm building a new version of the 
kernel with this patch added...
-- Fernando

-------- Original Message --------
Subject: Re: [ANNOUNCE] 3.2.9-rt15
Date: Mon, 05 Mar 2012 17:14:00 -0500
From: Steven Rostedt <rostedt at goodmis.org>
To: Thomas Gleixner <tglx at linutronix.de>
CC: LKML <linux-kernel at vger.kernel.org>,        linux-rt-users	 
<linux-rt-users at vger.kernel.org>,        Clark Williams 
<clark at redhat.com>,        "Luis	Claudio R. Goncalves"	 
<lclaudio at uudg.org>,        Fernando Lopez-Lezcano 
<nando at ccrma.Stanford.EDU>


Please fold this change into


As the patch was never tested (nor even compiled) it introduced a nasty
bug into taking a CPU down instead of fixing one.


-- Steve

diff --git a/kernel/cpu.c b/kernel/cpu.c
index c25b5ff..66dfb74 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -59,16 +59,20 @@ static struct {
  	int refcount;
  } cpu_hotplug = {
  	.active_writer = NULL,
+	.lock = __SPIN_LOCK_UNLOCKED(cpu_hotplug.lock),
  	.lock = __MUTEX_INITIALIZER(cpu_hotplug.lock),
  	.refcount = 0,

-# define hotplug_lock() spin_lock(&cpu_hotplug.lock)
-# define hotplug_unlock() spin_unlock(&cpu_hotplug.lock)
+# define hotplug_lock() rt_spin_lock(&cpu_hotplug.lock)
+# define hotplug_unlock() rt_spin_unlock(&cpu_hotplug.lock)
  # define hotplug_lock() mutex_lock(&cpu_hotplug.lock)
-# define hotplug_lock() mutex_unlock(&cpu_hotplug.lock)
+# define hotplug_unlock() mutex_unlock(&cpu_hotplug.lock)

  struct hotplug_pcp {

More information about the PlanetCCRMA mailing list