Commit fd21069d authored by David Vrabel's avatar David Vrabel Committed by Konrad Rzeszutek Wilk

xen/events: add xen_evtchn_mask_all()

Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
Reviewed-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
parent d0b075ff
...@@ -344,6 +344,14 @@ static void bind_evtchn_to_cpu(unsigned int chn, unsigned int cpu) ...@@ -344,6 +344,14 @@ static void bind_evtchn_to_cpu(unsigned int chn, unsigned int cpu)
info->cpu = cpu; info->cpu = cpu;
} }
static void xen_evtchn_mask_all(void)
{
unsigned int evtchn;
for (evtchn = 0; evtchn < xen_evtchn_nr_channels(); evtchn++)
mask_evtchn(evtchn);
}
/** /**
* notify_remote_via_irq - send event to remote end of event channel via irq * notify_remote_via_irq - send event to remote end of event channel via irq
* @irq: irq of event channel to send event to * @irq: irq of event channel to send event to
...@@ -1520,12 +1528,11 @@ EXPORT_SYMBOL_GPL(xen_test_irq_shared); ...@@ -1520,12 +1528,11 @@ EXPORT_SYMBOL_GPL(xen_test_irq_shared);
void xen_irq_resume(void) void xen_irq_resume(void)
{ {
unsigned int cpu, evtchn; unsigned int cpu;
struct irq_info *info; struct irq_info *info;
/* New event-channel space is not 'live' yet. */ /* New event-channel space is not 'live' yet. */
for (evtchn = 0; evtchn < xen_evtchn_nr_channels(); evtchn++) xen_evtchn_mask_all();
mask_evtchn(evtchn);
/* No IRQ <-> event-channel mappings. */ /* No IRQ <-> event-channel mappings. */
list_for_each_entry(info, &xen_irq_list_head, list) list_for_each_entry(info, &xen_irq_list_head, list)
...@@ -1624,8 +1631,6 @@ void xen_callback_vector(void) {} ...@@ -1624,8 +1631,6 @@ void xen_callback_vector(void) {}
void __init xen_init_IRQ(void) void __init xen_init_IRQ(void)
{ {
int i;
xen_evtchn_2l_init(); xen_evtchn_2l_init();
evtchn_to_irq = kcalloc(EVTCHN_ROW(xen_evtchn_max_channels()), evtchn_to_irq = kcalloc(EVTCHN_ROW(xen_evtchn_max_channels()),
...@@ -1633,8 +1638,7 @@ void __init xen_init_IRQ(void) ...@@ -1633,8 +1638,7 @@ void __init xen_init_IRQ(void)
BUG_ON(!evtchn_to_irq); BUG_ON(!evtchn_to_irq);
/* No event channels are 'live' right now. */ /* No event channels are 'live' right now. */
for (i = 0; i < xen_evtchn_nr_channels(); i++) xen_evtchn_mask_all();
mask_evtchn(i);
pirq_needs_eoi = pirq_needs_eoi_flag; pirq_needs_eoi = pirq_needs_eoi_flag;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment