]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
xen: dont fiddle with event channel masking in suspend/resume
authorJuergen Gross <jgross@suse.com>
Mon, 17 Jul 2017 17:47:03 +0000 (19:47 +0200)
committerJuergen Gross <jgross@suse.com>
Thu, 27 Jul 2017 17:55:46 +0000 (19:55 +0200)
Instead of fiddling with masking the event channels during suspend
and resume handling let do the irq subsystem do its job. It will do
the mask and unmask operations as needed.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Tested-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
drivers/xen/events/events_base.c

index b241bfa529ce3cd9879da106b04531fc03b005e9..bae1f5d36c26e8eac1a7ce9473a3ca7999b90642 100644 (file)
@@ -343,14 +343,6 @@ 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
  * @irq: irq of event channel to send event to
 /**
  * notify_remote_via_irq - send event to remote end of event channel via irq
  * @irq: irq of event channel to send event to
@@ -1573,7 +1565,6 @@ void xen_irq_resume(void)
        struct irq_info *info;
 
        /* New event-channel space is not 'live' yet. */
        struct irq_info *info;
 
        /* New event-channel space is not 'live' yet. */
-       xen_evtchn_mask_all();
        xen_evtchn_resume();
 
        /* No IRQ <-> event-channel mappings. */
        xen_evtchn_resume();
 
        /* No IRQ <-> event-channel mappings. */
@@ -1681,6 +1672,7 @@ module_param(fifo_events, bool, 0);
 void __init xen_init_IRQ(void)
 {
        int ret = -EINVAL;
 void __init xen_init_IRQ(void)
 {
        int ret = -EINVAL;
+       unsigned int evtchn;
 
        if (fifo_events)
                ret = xen_evtchn_fifo_init();
 
        if (fifo_events)
                ret = xen_evtchn_fifo_init();
@@ -1692,7 +1684,8 @@ void __init xen_init_IRQ(void)
        BUG_ON(!evtchn_to_irq);
 
        /* No event channels are 'live' right now. */
        BUG_ON(!evtchn_to_irq);
 
        /* No event channels are 'live' right now. */
-       xen_evtchn_mask_all();
+       for (evtchn = 0; evtchn < xen_evtchn_nr_channels(); evtchn++)
+               mask_evtchn(evtchn);
 
        pirq_needs_eoi = pirq_needs_eoi_flag;
 
 
        pirq_needs_eoi = pirq_needs_eoi_flag;