mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
xen: save previous spinlock when blocking
A spinlock can be interrupted while spinning, so make sure we preserve the previous lock of interest if we're taking a lock from within an interrupt handler. We also need to deal with the case where the blocking path gets interrupted between testing to see if the lock is free and actually blocking. If we get interrupted there and end up in the state where the lock is free but the irq isn't pending, then we'll block indefinitely in the hypervisor. This fix is to make sure that any nested lock-takers will always leave the irq pending if there's any chance the outer lock became free. Signed-off-by: Jeremy Fitzhardinge <[email protected]> Acked-by: Jan Beulich <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
7708ad64a2
commit
168d2f464a
3 changed files with 77 additions and 15 deletions
|
|
@ -46,6 +46,8 @@ extern void xen_irq_resume(void);
|
|||
|
||||
/* Clear an irq's pending state, in preparation for polling on it */
|
||||
void xen_clear_irq_pending(int irq);
|
||||
void xen_set_irq_pending(int irq);
|
||||
bool xen_test_irq_pending(int irq);
|
||||
|
||||
/* Poll waiting for an irq to become pending. In the usual case, the
|
||||
irq will be disabled so it won't deliver an interrupt. */
|
||||
|
|
|
|||
Loading…
Reference in a new issue