|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/IRQ: relax locking in irq_guest_eoi_timer_fn()
commit f6b00177c38068eb2ad1b00f62a3db4a28e18a9c
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Jun 6 11:14:00 2019 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Jun 6 11:14:00 2019 +0200
x86/IRQ: relax locking in irq_guest_eoi_timer_fn()
This is a timer handler, so it gets entered with IRQs enabled. Therefore
there's no need to save/restore the IRQ masking flag.
Additionally the final switch()'es ACKTYPE_EOI case re-acquires the lock
just for it to be dropped again right away. Do away with this.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
xen/arch/x86/irq.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index 0035174d1f..d6451a903b 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -1109,9 +1109,8 @@ static void irq_guest_eoi_timer_fn(void *data)
unsigned int irq = desc - irq_desc;
irq_guest_action_t *action;
cpumask_t cpu_eoi_map;
- unsigned long flags;
- spin_lock_irqsave(&desc->lock, flags);
+ spin_lock_irq(&desc->lock);
if ( !(desc->status & IRQ_GUEST) )
goto out;
@@ -1143,12 +1142,11 @@ static void irq_guest_eoi_timer_fn(void *data)
cpumask_copy(&cpu_eoi_map, action->cpu_eoi_map);
spin_unlock_irq(&desc->lock);
on_selected_cpus(&cpu_eoi_map, set_eoi_ready, desc, 0);
- spin_lock_irq(&desc->lock);
- break;
+ return;
}
out:
- spin_unlock_irqrestore(&desc->lock, flags);
+ spin_unlock_irq(&desc->lock);
}
static void __do_IRQ_guest(int irq)
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |