]> git.baikalelectronics.ru Git - kernel.git/commit
ia64: salinfo: use a waitqueue instead a sema down/up combo
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Mon, 25 Jul 2016 08:43:13 +0000 (10:43 +0200)
committerTony Luck <tony.luck@intel.com>
Mon, 25 Jul 2016 16:55:32 +0000 (09:55 -0700)
commit27e3b25acdec35c72dfb786065bf28099fddc68b
tree7c17fa1f6f451a838974067ef63372818404c495
parentd3912668a9087eeafb2ca0d08cf554763c5b613f
ia64: salinfo: use a waitqueue instead a sema down/up combo

The only purpose of down_try_lock() followed by up() seems to be to wake
up a possible reader. This patch replaces it with a wake-queue. There is
no locking around cpumask_empty() and the test is re-done in case there
was no hit.
With wait_event_interruptible_lock_irq(,&data_saved_lock) we would probably
be able to get rid of the `retry` label. However we still can return CPU
X which is valid now but later (after the lock dropped) the event may
have been removed because the CPU went offline.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/kernel/salinfo.c