diff options
| -rw-r--r-- | drivers/xen/events.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index f78945ce8aeb..f34288a5400c 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c | |||
| @@ -1293,6 +1293,42 @@ static int retrigger_dynirq(unsigned int irq) | |||
| 1293 | return ret; | 1293 | return ret; |
| 1294 | } | 1294 | } |
| 1295 | 1295 | ||
| 1296 | static void restore_cpu_pirqs(void) | ||
| 1297 | { | ||
| 1298 | int pirq, rc, irq, gsi; | ||
| 1299 | struct physdev_map_pirq map_irq; | ||
| 1300 | |||
| 1301 | for (pirq = 0; pirq < nr_irqs; pirq++) { | ||
| 1302 | irq = pirq_to_irq[pirq]; | ||
| 1303 | if (irq == -1) | ||
| 1304 | continue; | ||
| 1305 | |||
| 1306 | /* save/restore of PT devices doesn't work, so at this point the | ||
| 1307 | * only devices present are GSI based emulated devices */ | ||
| 1308 | gsi = gsi_from_irq(irq); | ||
| 1309 | if (!gsi) | ||
| 1310 | continue; | ||
| 1311 | |||
| 1312 | map_irq.domid = DOMID_SELF; | ||
| 1313 | map_irq.type = MAP_PIRQ_TYPE_GSI; | ||
| 1314 | map_irq.index = gsi; | ||
| 1315 | map_irq.pirq = pirq; | ||
| 1316 | |||
| 1317 | rc = HYPERVISOR_physdev_op(PHYSDEVOP_map_pirq, &map_irq); | ||
| 1318 | if (rc) { | ||
| 1319 | printk(KERN_WARNING "xen map irq failed gsi=%d irq=%d pirq=%d rc=%d\n", | ||
| 1320 | gsi, irq, pirq, rc); | ||
| 1321 | irq_info[irq] = mk_unbound_info(); | ||
| 1322 | pirq_to_irq[pirq] = -1; | ||
| 1323 | continue; | ||
| 1324 | } | ||
| 1325 | |||
| 1326 | printk(KERN_DEBUG "xen: --> irq=%d, pirq=%d\n", irq, map_irq.pirq); | ||
| 1327 | |||
| 1328 | startup_pirq(irq); | ||
| 1329 | } | ||
| 1330 | } | ||
| 1331 | |||
| 1296 | static void restore_cpu_virqs(unsigned int cpu) | 1332 | static void restore_cpu_virqs(unsigned int cpu) |
| 1297 | { | 1333 | { |
| 1298 | struct evtchn_bind_virq bind_virq; | 1334 | struct evtchn_bind_virq bind_virq; |
| @@ -1436,6 +1472,8 @@ void xen_irq_resume(void) | |||
| 1436 | 1472 | ||
| 1437 | unmask_evtchn(evtchn); | 1473 | unmask_evtchn(evtchn); |
| 1438 | } | 1474 | } |
| 1475 | |||
| 1476 | restore_cpu_pirqs(); | ||
| 1439 | } | 1477 | } |
| 1440 | 1478 | ||
| 1441 | static struct irq_chip xen_dynamic_chip __read_mostly = { | 1479 | static struct irq_chip xen_dynamic_chip __read_mostly = { |
