]> xenbits.xensource.com Git - xen.git/commitdiff
mini-os: use unbind_evtchn in unbind_all_ports
authorThomas Leonard <talex5@gmail.com>
Thu, 26 Jun 2014 11:28:21 +0000 (12:28 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 27 Jun 2014 12:38:34 +0000 (13:38 +0100)
This marks the channel as closed, in case someone tries to use it again.

Signed-off-by: Thomas Leonard <talex5@gmail.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
extras/mini-os/events.c

index f708cb4d88ef20e4fb28a02e22501ad1de7f6607..3c92d825b7b4d664bc5c5435a018654ec3a3e68a 100644 (file)
@@ -43,7 +43,6 @@ void unbind_all_ports(void)
     int cpu = 0;
     shared_info_t *s = HYPERVISOR_shared_info;
     vcpu_info_t   *vcpu_info = &s->vcpu_info[cpu];
-    int rc;
 
     for ( i = 0; i < NR_EVS; i++ )
     {
@@ -53,14 +52,8 @@ void unbind_all_ports(void)
 
         if ( test_and_clear_bit(i, bound_ports) )
         {
-            struct evtchn_close close;
             printk("port %d still bound!\n", i);
-            mask_evtchn(i);
-            close.port = i;
-            rc = HYPERVISOR_event_channel_op(EVTCHNOP_close, &close);
-            if ( rc )
-                printk("WARN: close_port %s failed rc=%d. ignored\n", i, rc);
-            clear_evtchn(i);
+           unbind_evtchn(i);
         }
     }
     vcpu_info->evtchn_upcall_pending = 0;