summaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2011-01-11 17:20:14 +0000
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-03-03 11:56:58 -0500
commitcbf6aa89fc52c5253ee141d53eeb73147eb37ac0 (patch)
tree95038da95dc29513a7727e33d0049a99f98febe7 /drivers/xen
parent3f2a230caf21a1f7ac75f9e4892d0e5af9ccee88 (diff)
downloadop-kernel-dev-cbf6aa89fc52c5253ee141d53eeb73147eb37ac0.zip
op-kernel-dev-cbf6aa89fc52c5253ee141d53eeb73147eb37ac0.tar.gz
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')
-rw-r--r--drivers/xen/events.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 7468147..1ae7757 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -387,23 +387,6 @@ static int get_nr_hw_irqs(void)
return ret;
}
-static int find_unbound_pirq(int type)
-{
- int rc, i;
- struct physdev_get_free_pirq op_get_free_pirq;
- 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;
-}
-
static int find_unbound_irq(void)
{
struct irq_data *data;
@@ -677,6 +660,23 @@ out:
#include <linux/msi.h>
#include "../pci/msi.h"
+static int find_unbound_pirq(int type)
+{
+ int rc, i;
+ struct physdev_get_free_pirq op_get_free_pirq;
+ 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;
+}
+
void xen_allocate_pirq_msi(char *name, int *irq, int *pirq, int alloc)
{
spin_lock(&irq_mapping_update_lock);
OpenPOWER on IntegriCloud