Thread (4 messages) read the whole thread 4 messages, 3 authors, 2012-03-06

Re: [ANNOUNCE] 3.2.9-rt15

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2012-03-05 22:14:05
Also in: lkml
Subsystem: cpu hotplug, the rest · Maintainers: Thomas Gleixner, Peter Zijlstra, Linus Torvalds

Thomas,

Please fold this change into

   cpu-rt-make-hotplug-lock-a-sleeping-spinlock-on-rt.patch


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

Thanks,

-- 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,
+#ifdef CONFIG_PREEMPT_RT_FULL
+	.lock = __SPIN_LOCK_UNLOCKED(cpu_hotplug.lock),
+#else
 	.lock = __MUTEX_INITIALIZER(cpu_hotplug.lock),
+#endif
 	.refcount = 0,
 };
 
 #ifdef CONFIG_PREEMPT_RT_FULL
-# 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)
 #else
 # define hotplug_lock() mutex_lock(&cpu_hotplug.lock)
-# define hotplug_lock() mutex_unlock(&cpu_hotplug.lock)
+# define hotplug_unlock() mutex_unlock(&cpu_hotplug.lock)
 #endif
 
 struct hotplug_pcp {

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help