Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 222924
b: refs/heads/master
c: 9a069c3
h: refs/heads/master
v: v3
  • Loading branch information
Stefano Stabellini committed Dec 2, 2010
1 parent a87c4d4 commit 5c8544c
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6411fe69b8c4fd7811339c88c1843d562099fa2b
refs/heads/master: 9a069c33c53c2e72ec1b76106be73df044af0195
38 changes: 38 additions & 0 deletions trunk/drivers/xen/events.c
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,42 @@ static int retrigger_dynirq(unsigned int irq)
return ret;
}

static void restore_cpu_pirqs(void)
{
int pirq, rc, irq, gsi;
struct physdev_map_pirq map_irq;

for (pirq = 0; pirq < nr_irqs; pirq++) {
irq = pirq_to_irq[pirq];
if (irq == -1)
continue;

/* save/restore of PT devices doesn't work, so at this point the
* only devices present are GSI based emulated devices */
gsi = gsi_from_irq(irq);
if (!gsi)
continue;

map_irq.domid = DOMID_SELF;
map_irq.type = MAP_PIRQ_TYPE_GSI;
map_irq.index = gsi;
map_irq.pirq = pirq;

rc = HYPERVISOR_physdev_op(PHYSDEVOP_map_pirq, &map_irq);
if (rc) {
printk(KERN_WARNING "xen map irq failed gsi=%d irq=%d pirq=%d rc=%d\n",
gsi, irq, pirq, rc);
irq_info[irq] = mk_unbound_info();
pirq_to_irq[pirq] = -1;
continue;
}

printk(KERN_DEBUG "xen: --> irq=%d, pirq=%d\n", irq, map_irq.pirq);

startup_pirq(irq);
}
}

static void restore_cpu_virqs(unsigned int cpu)
{
struct evtchn_bind_virq bind_virq;
Expand Down Expand Up @@ -1436,6 +1472,8 @@ void xen_irq_resume(void)

unmask_evtchn(evtchn);
}

restore_cpu_pirqs();
}

static struct irq_chip xen_dynamic_chip __read_mostly = {
Expand Down

0 comments on commit 5c8544c

Please sign in to comment.