diff options
author | David Vrabel <david.vrabel@citrix.com> | 2013-10-14 10:15:49 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2013-10-14 10:15:49 +0200 |
commit | fbbd5009e6ed1201731b1727762070c1a988e67d (patch) | |
tree | 381a98fa04cc3a6625df6030b60bde4c4e701145 /xen/arch/x86/irq.c | |
parent | 17ae93b12ddf22f2d794260a3dc2947858c625a0 (diff) | |
download | xen-fbbd5009e6ed1201731b1727762070c1a988e67d.tar.gz xen-fbbd5009e6ed1201731b1727762070c1a988e67d.tar.bz2 xen-fbbd5009e6ed1201731b1727762070c1a988e67d.zip |
evtchn: refactor low-level event channel port ops
Use functions for the low-level event channel port operations
(set/clear pending, unmask, is_pending and is_masked).
Group these functions into a struct evtchn_port_op so they can be
replaced by alternate implementations (for different ABIs) on a
per-domain basis.
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/arch/x86/irq.c')
-rw-r--r-- | xen/arch/x86/irq.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 7f547ff0b6..53fe9e32de 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -1474,7 +1474,7 @@ int pirq_guest_unmask(struct domain *d) { pirq = pirqs[i]->pirq; if ( pirqs[i]->masked && - !test_bit(pirqs[i]->evtchn, &shared_info(d, evtchn_mask)) ) + !evtchn_port_is_masked(d, evtchn_from_port(d, pirqs[i]->evtchn)) ) pirq_guest_eoi(pirqs[i]); } } while ( ++pirq < d->nr_pirqs && n == ARRAY_SIZE(pirqs) ); @@ -2222,6 +2222,7 @@ static void dump_irqs(unsigned char key) int i, irq, pirq; struct irq_desc *desc; irq_guest_action_t *action; + struct evtchn *evtchn; struct domain *d; const struct pirq *info; unsigned long flags; @@ -2262,13 +2263,11 @@ static void dump_irqs(unsigned char key) d = action->guest[i]; pirq = domain_irq_to_pirq(d, irq); info = pirq_info(d, pirq); + evtchn = evtchn_from_port(d, info->evtchn); printk("%u:%3d(%c%c%c)", d->domain_id, pirq, - (test_bit(info->evtchn, - &shared_info(d, evtchn_pending)) ? - 'P' : '-'), - (test_bit(info->evtchn, &shared_info(d, evtchn_mask)) ? - 'M' : '-'), + (evtchn_port_is_pending(d, evtchn) ? 'P' : '-'), + (evtchn_port_is_masked(d, evtchn) ? 'M' : '-'), (info->masked ? 'M' : '-')); if ( i != action->nr_guests ) printk(","); |