]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
cpu: Make hotplug.lock a "sleeping" spinlock on RT
authorSteven Rostedt <rostedt@goodmis.org>
Fri, 2 Mar 2012 15:36:57 +0000 (10:36 -0500)
committerMichal Sojka <sojka@merica.cz>
Sun, 13 Sep 2015 07:47:39 +0000 (09:47 +0200)
commit701668f2a609f4970fd231f318a970ed5a11488d
tree25845b5f1af8e2c31bb5b983387c0898802a5784
parentc6d04a030d80de6792cf5505e4a68f9c85eaf7d9
cpu: Make hotplug.lock a "sleeping" spinlock on RT

Tasks can block on hotplug.lock in pin_current_cpu(), but their state
might be != RUNNING. So the mutex wakeup will set the state
unconditionally to RUNNING. That might cause spurious unexpected
wakeups. We could provide a state preserving mutex_lock() function,
but this is semantically backwards. So instead we convert the
hotplug.lock() to a spinlock for RT, which has the state preserving
semantics already.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Carsten Emde <C.Emde@osadl.org>
Cc: John Kacur <jkacur@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Clark Williams <clark.williams@gmail.com>
Cc: stable-rt@vger.kernel.org
Link: http://lkml.kernel.org/r/1330702617.25686.265.camel@gandalf.stny.rr.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/cpu.c