From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756581Ab2CEWOF (ORCPT ); Mon, 5 Mar 2012 17:14:05 -0500 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.122]:13822 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754711Ab2CEWOD (ORCPT ); Mon, 5 Mar 2012 17:14:03 -0500 X-Authority-Analysis: v=2.0 cv=Xp94yC59 c=1 sm=0 a=ZycB6UtQUfgMyuk2+PxD7w==:17 a=XQbtiDEiEegA:10 a=5SG0PmZfjMsA:10 a=Q9fys5e9bTEA:10 a=io4tkrCHpDoPPcwbIBsA:9 a=vngTnXs6-xot6x43z3YA:7 a=PUjeQqilurYA:10 a=ZycB6UtQUfgMyuk2+PxD7w==:117 X-Cloudmark-Score: 0 X-Originating-IP: 74.67.80.29 Message-ID: <1330985640.25686.342.camel@gandalf.stny.rr.com> Subject: Re: [ANNOUNCE] 3.2.9-rt15 From: Steven Rostedt To: Thomas Gleixner Cc: LKML , linux-rt-users , Clark Williams , "Luis Claudio R. Goncalves" , Fernando Lopez-Lezcano Date: Mon, 05 Mar 2012 17:14:00 -0500 In-Reply-To: References: Content-Type: text/plain; charset="ISO-8859-15" X-Mailer: Evolution 3.2.2-1 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 {