Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234179
b: refs/heads/master
c: cbf6aa8
h: refs/heads/master
i:
  234177: 57fc637
  234175: 5c7a9b2
v: v3
  • Loading branch information
Ian Campbell authored and Konrad Rzeszutek Wilk committed Mar 3, 2011
1 parent 4fb4324 commit 0e01b97
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3f2a230caf21a1f7ac75f9e4892d0e5af9ccee88
refs/heads/master: cbf6aa89fc52c5253ee141d53eeb73147eb37ac0
34 changes: 17 additions & 17 deletions trunk/drivers/xen/events.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -677,6 +660,23 @@ int xen_map_pirq_gsi(unsigned pirq, unsigned gsi, int shareable, char *name)
#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);
Expand Down

0 comments on commit 0e01b97

Please sign in to comment.