diff options
author | David Vrabel <david.vrabel@citrix.com> | 2013-09-05 13:11:38 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2014-01-06 10:07:49 -0500 |
commit | fd21069dfe31a4b20f5ef580006abe72d1660f5b (patch) | |
tree | b017eebbcb603ebeee88dac8824c03fde0ee4a5e /drivers/xen/events | |
parent | d0b075ffeede257342c3afdbeadd2fda8504ecee (diff) |
xen/events: add xen_evtchn_mask_all()
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Diffstat (limited to 'drivers/xen/events')
-rw-r--r-- | drivers/xen/events/events_base.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c index a6906665de53..c6d64f1e191c 100644 --- a/drivers/xen/events/events_base.c +++ b/drivers/xen/events/events_base.c | |||
@@ -344,6 +344,14 @@ static void bind_evtchn_to_cpu(unsigned int chn, unsigned int cpu) | |||
344 | info->cpu = cpu; | 344 | info->cpu = cpu; |
345 | } | 345 | } |
346 | 346 | ||
347 | static void xen_evtchn_mask_all(void) | ||
348 | { | ||
349 | unsigned int evtchn; | ||
350 | |||
351 | for (evtchn = 0; evtchn < xen_evtchn_nr_channels(); evtchn++) | ||
352 | mask_evtchn(evtchn); | ||
353 | } | ||
354 | |||
347 | /** | 355 | /** |
348 | * notify_remote_via_irq - send event to remote end of event channel via irq | 356 | * notify_remote_via_irq - send event to remote end of event channel via irq |
349 | * @irq: irq of event channel to send event to | 357 | * @irq: irq of event channel to send event to |
@@ -1520,12 +1528,11 @@ EXPORT_SYMBOL_GPL(xen_test_irq_shared); | |||
1520 | 1528 | ||
1521 | void xen_irq_resume(void) | 1529 | void xen_irq_resume(void) |
1522 | { | 1530 | { |
1523 | unsigned int cpu, evtchn; | 1531 | unsigned int cpu; |
1524 | struct irq_info *info; | 1532 | struct irq_info *info; |
1525 | 1533 | ||
1526 | /* New event-channel space is not 'live' yet. */ | 1534 | /* New event-channel space is not 'live' yet. */ |
1527 | for (evtchn = 0; evtchn < xen_evtchn_nr_channels(); evtchn++) | 1535 | xen_evtchn_mask_all(); |
1528 | mask_evtchn(evtchn); | ||
1529 | 1536 | ||
1530 | /* No IRQ <-> event-channel mappings. */ | 1537 | /* No IRQ <-> event-channel mappings. */ |
1531 | list_for_each_entry(info, &xen_irq_list_head, list) | 1538 | list_for_each_entry(info, &xen_irq_list_head, list) |
@@ -1624,8 +1631,6 @@ void xen_callback_vector(void) {} | |||
1624 | 1631 | ||
1625 | void __init xen_init_IRQ(void) | 1632 | void __init xen_init_IRQ(void) |
1626 | { | 1633 | { |
1627 | int i; | ||
1628 | |||
1629 | xen_evtchn_2l_init(); | 1634 | xen_evtchn_2l_init(); |
1630 | 1635 | ||
1631 | evtchn_to_irq = kcalloc(EVTCHN_ROW(xen_evtchn_max_channels()), | 1636 | evtchn_to_irq = kcalloc(EVTCHN_ROW(xen_evtchn_max_channels()), |
@@ -1633,8 +1638,7 @@ void __init xen_init_IRQ(void) | |||
1633 | BUG_ON(!evtchn_to_irq); | 1638 | BUG_ON(!evtchn_to_irq); |
1634 | 1639 | ||
1635 | /* No event channels are 'live' right now. */ | 1640 | /* No event channels are 'live' right now. */ |
1636 | for (i = 0; i < xen_evtchn_nr_channels(); i++) | 1641 | xen_evtchn_mask_all(); |
1637 | mask_evtchn(i); | ||
1638 | 1642 | ||
1639 | pirq_needs_eoi = pirq_needs_eoi_flag; | 1643 | pirq_needs_eoi = pirq_needs_eoi_flag; |
1640 | 1644 | ||