Merge tag 'stable/for-linus-3.9-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel...
[firefly-linux-kernel-4.4.55.git] / drivers / xen / events.c
index 342edc0495cc893bd037e27303bfdc9dc4144707..d17aa41a9041428fbff17a890b2af18b64422ef4 100644 (file)
@@ -855,7 +855,7 @@ int bind_evtchn_to_irq(unsigned int evtchn)
 
        if (irq == -1) {
                irq = xen_allocate_irq_dynamic();
-               if (irq == -1)
+               if (irq < 0)
                        goto out;
 
                irq_set_chip_and_handler_name(irq, &xen_dynamic_chip,
@@ -959,7 +959,7 @@ int bind_virq_to_irq(unsigned int virq, unsigned int cpu)
 
        if (irq == -1) {
                irq = xen_allocate_irq_dynamic();
-               if (irq == -1)
+               if (irq < 0)
                        goto out;
 
                irq_set_chip_and_handler_name(irq, &xen_percpu_chip,
@@ -1806,7 +1806,7 @@ void xen_callback_vector(void)
        int rc;
        uint64_t callback_via;
        if (xen_have_vector_callback) {
-               callback_via = HVM_CALLBACK_VECTOR(XEN_HVM_EVTCHN_CALLBACK);
+               callback_via = HVM_CALLBACK_VECTOR(HYPERVISOR_CALLBACK_VECTOR);
                rc = xen_set_callback_via(callback_via);
                if (rc) {
                        printk(KERN_ERR "Request for Xen HVM callback vector"
@@ -1817,8 +1817,9 @@ void xen_callback_vector(void)
                printk(KERN_INFO "Xen HVM callback vector for event delivery is "
                                "enabled\n");
                /* in the restore case the vector has already been allocated */
-               if (!test_bit(XEN_HVM_EVTCHN_CALLBACK, used_vectors))
-                       alloc_intr_gate(XEN_HVM_EVTCHN_CALLBACK, xen_hvm_callback_vector);
+               if (!test_bit(HYPERVISOR_CALLBACK_VECTOR, used_vectors))
+                       alloc_intr_gate(HYPERVISOR_CALLBACK_VECTOR,
+                                       xen_hvm_callback_vector);
        }
 }
 #else