[kernel] r18798 - in dists/sid/linux-2.6/debian: . patches/features/all/rt
Uwe Kleine-König
ukleinek-guest at alioth.debian.org
Tue Mar 6 08:29:24 UTC 2012
Author: ukleinek-guest
Date: Tue Mar 6 08:29:22 2012
New Revision: 18798
Log:
[rt] fix locking when taking down a CPU
Modified:
dists/sid/linux-2.6/debian/changelog
dists/sid/linux-2.6/debian/patches/features/all/rt/cpu-rt-make-hotplug-lock-a-sleeping-spinlock-on-rt.patch
Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog Mon Mar 5 13:41:33 2012 (r18797)
+++ dists/sid/linux-2.6/debian/changelog Tue Mar 6 08:29:22 2012 (r18798)
@@ -1,3 +1,9 @@
+linux-2.6 (3.2.9-2) UNRELEASED; urgency=low
+
+ * [rt] fix locking when taking down a CPU
+
+ -- Uwe Kleine-König <u.kleine-koenig at pengutronix.de> Tue, 06 Mar 2012 09:26:00 +0100
+
linux-2.6 (3.2.9-1) unstable; urgency=high
* New upstream stable update:
Modified: dists/sid/linux-2.6/debian/patches/features/all/rt/cpu-rt-make-hotplug-lock-a-sleeping-spinlock-on-rt.patch
==============================================================================
--- dists/sid/linux-2.6/debian/patches/features/all/rt/cpu-rt-make-hotplug-lock-a-sleeping-spinlock-on-rt.patch Mon Mar 5 13:41:33 2012 (r18797)
+++ dists/sid/linux-2.6/debian/patches/features/all/rt/cpu-rt-make-hotplug-lock-a-sleeping-spinlock-on-rt.patch Tue Mar 6 08:29:22 2012 (r18798)
@@ -18,8 +18,11 @@
Cc: stable-rt at vger.kernel.org
Link: http://lkml.kernel.org/r/1330702617.25686.265.camel@gandalf.stny.rr.com
Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
+---
+[ukleinek: squash in an obvious fix by Steven Rostedt
+ id:1330985640.25686.342.camel at gandalf.stny.rr.com]
diff --git a/kernel/cpu.c b/kernel/cpu.c
-index fa40834..c25b5ff 100644
+index fa40834..66dfb74 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -46,7 +46,12 @@ static int cpu_hotplug_disabled;
@@ -35,16 +38,24 @@
/*
* Also blocks the new readers during
* an ongoing cpu hotplug operation.
-@@ -58,6 +63,14 @@ static struct {
+@@ -54,10 +59,22 @@ 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 {
More information about the Kernel-svn-changes
mailing list