diff --git a/[refs] b/[refs] index 568ef93ea177..3376e66b57c5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9a626612c2010699d9909a4c3141d3a38660f3b3 +refs/heads/master: 5cad61a6ba6f4956a218ffbb64cafcc1daefaca0 diff --git a/trunk/drivers/xen/events.c b/trunk/drivers/xen/events.c index ed3420df0937..c21066fc30be 100644 --- a/trunk/drivers/xen/events.c +++ b/trunk/drivers/xen/events.c @@ -649,19 +649,16 @@ int xen_map_pirq_gsi(unsigned pirq, unsigned gsi, int shareable, char *name) static int find_unbound_pirq(int type) { - int rc, i; + int rc; struct physdev_get_free_pirq op_get_free_pirq; - op_get_free_pirq.type = type; + op_get_free_pirq.type = type; rc = HYPERVISOR_physdev_op(PHYSDEVOP_get_free_pirq, &op_get_free_pirq); - if (!rc) - return op_get_free_pirq.pirq; - for (i = 0; i < nr_irqs; i++) { - if (pirq_to_irq[i] < 0) - return i; - } - return -1; + WARN_ONCE(rc == -ENOSYS, + "hypervisor does not support the PHYSDEVOP_get_free_pirq interface\n"); + + return rc ? -1 : op_get_free_pirq.pirq; } int xen_allocate_pirq_msi(char *name, int *pirq, int alloc_pirq)