diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2011-01-11 12:20:14 -0500 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-03-03 11:56:58 -0500 |
commit | cbf6aa89fc52c5253ee141d53eeb73147eb37ac0 (patch) | |
tree | 95038da95dc29513a7727e33d0049a99f98febe7 /drivers/xen/events.c | |
parent | 3f2a230caf21a1f7ac75f9e4892d0e5af9ccee88 (diff) |
xen:events: move find_unbound_irq inside CONFIG_PCI_MSI
The only caller is xen_allocate_pirq_msi which is also under this
ifdef so this fixes:
drivers/xen/events.c:377: warning: 'find_unbound_pirq' defined but not used
when CONFIG_PCI_MSI=n
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Diffstat (limited to 'drivers/xen/events.c')
-rw-r--r-- | drivers/xen/events.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 74681478100a..1ae775742325 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c | |||
@@ -387,23 +387,6 @@ static int get_nr_hw_irqs(void) | |||
387 | return ret; | 387 | return ret; |
388 | } | 388 | } |
389 | 389 | ||
390 | static int find_unbound_pirq(int type) | ||
391 | { | ||
392 | int rc, i; | ||
393 | struct physdev_get_free_pirq op_get_free_pirq; | ||
394 | op_get_free_pirq.type = type; | ||
395 | |||
396 | rc = HYPERVISOR_physdev_op(PHYSDEVOP_get_free_pirq, &op_get_free_pirq); | ||
397 | if (!rc) | ||
398 | return op_get_free_pirq.pirq; | ||
399 | |||
400 | for (i = 0; i < nr_irqs; i++) { | ||
401 | if (pirq_to_irq[i] < 0) | ||
402 | return i; | ||
403 | } | ||
404 | return -1; | ||
405 | } | ||
406 | |||
407 | static int find_unbound_irq(void) | 390 | static int find_unbound_irq(void) |
408 | { | 391 | { |
409 | struct irq_data *data; | 392 | struct irq_data *data; |
@@ -677,6 +660,23 @@ out: | |||
677 | #include <linux/msi.h> | 660 | #include <linux/msi.h> |
678 | #include "../pci/msi.h" | 661 | #include "../pci/msi.h" |
679 | 662 | ||
663 | static int find_unbound_pirq(int type) | ||
664 | { | ||
665 | int rc, i; | ||
666 | struct physdev_get_free_pirq op_get_free_pirq; | ||
667 | op_get_free_pirq.type = type; | ||
668 | |||
669 | rc = HYPERVISOR_physdev_op(PHYSDEVOP_get_free_pirq, &op_get_free_pirq); | ||
670 | if (!rc) | ||
671 | return op_get_free_pirq.pirq; | ||
672 | |||
673 | for (i = 0; i < nr_irqs; i++) { | ||
674 | if (pirq_to_irq[i] < 0) | ||
675 | return i; | ||
676 | } | ||
677 | return -1; | ||
678 | } | ||
679 | |||
680 | void xen_allocate_pirq_msi(char *name, int *irq, int *pirq, int alloc) | 680 | void xen_allocate_pirq_msi(char *name, int *irq, int *pirq, int alloc) |
681 | { | 681 | { |
682 | spin_lock(&irq_mapping_update_lock); | 682 | spin_lock(&irq_mapping_update_lock); |