]> git.baikalelectronics.ru Git - kernel.git/commit
xen, pvticketlock: Allow interrupts to be enabled while blocking
authorJeremy Fitzhardinge <jeremy@goop.org>
Fri, 9 Aug 2013 14:21:59 +0000 (19:51 +0530)
committerH. Peter Anvin <hpa@linux.intel.com>
Fri, 9 Aug 2013 14:54:03 +0000 (07:54 -0700)
commita6f186bb71671d6b5bf7a980af387939dadcab68
tree401ebe5d78455719bb3cf65faaa6d2ad1ec38fad
parentda6f53682192f658a504f71699cac741381f21d9
xen, pvticketlock: Allow interrupts to be enabled while blocking

If interrupts were enabled when taking the spinlock, we can leave them
enabled while blocking to get the lock.

If we can enable interrupts while waiting for the lock to become
available, and we take an interrupt before entering the poll,
and the handler takes a spinlock which ends up going into
the slow state (invalidating the per-cpu "lock" and "want" values),
then when the interrupt handler returns the event channel will
remain pending so the poll will return immediately, causing it to
return out to the main spinlock loop.

Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
Link: http://lkml.kernel.org/r/1376058122-8248-12-git-send-email-raghavendra.kt@linux.vnet.ibm.com
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
arch/x86/xen/spinlock.c