diff options
Diffstat (limited to 'drivers/xen/events.c')
| -rw-r--r-- | drivers/xen/events.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index efa683ee8840..c649ac0aaeef 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c | |||
| @@ -681,6 +681,8 @@ out: | |||
| 681 | int xen_destroy_irq(int irq) | 681 | int xen_destroy_irq(int irq) |
| 682 | { | 682 | { |
| 683 | struct irq_desc *desc; | 683 | struct irq_desc *desc; |
| 684 | struct physdev_unmap_pirq unmap_irq; | ||
| 685 | struct irq_info *info = info_for_irq(irq); | ||
| 684 | int rc = -ENOENT; | 686 | int rc = -ENOENT; |
| 685 | 687 | ||
| 686 | spin_lock(&irq_mapping_update_lock); | 688 | spin_lock(&irq_mapping_update_lock); |
| @@ -689,6 +691,15 @@ int xen_destroy_irq(int irq) | |||
| 689 | if (!desc) | 691 | if (!desc) |
| 690 | goto out; | 692 | goto out; |
| 691 | 693 | ||
| 694 | if (xen_initial_domain()) { | ||
| 695 | unmap_irq.pirq = info->u.pirq.gsi; | ||
| 696 | unmap_irq.domid = DOMID_SELF; | ||
| 697 | rc = HYPERVISOR_physdev_op(PHYSDEVOP_unmap_pirq, &unmap_irq); | ||
| 698 | if (rc) { | ||
| 699 | printk(KERN_WARNING "unmap irq failed %d\n", rc); | ||
| 700 | goto out; | ||
| 701 | } | ||
| 702 | } | ||
| 692 | irq_info[irq] = mk_unbound_info(); | 703 | irq_info[irq] = mk_unbound_info(); |
| 693 | 704 | ||
| 694 | irq_free_desc(irq); | 705 | irq_free_desc(irq); |
| @@ -1425,5 +1436,7 @@ void __init xen_init_IRQ(void) | |||
| 1425 | pci_xen_hvm_init(); | 1436 | pci_xen_hvm_init(); |
| 1426 | } else { | 1437 | } else { |
| 1427 | irq_ctx_init(smp_processor_id()); | 1438 | irq_ctx_init(smp_processor_id()); |
| 1439 | if (xen_initial_domain()) | ||
| 1440 | xen_setup_pirqs(); | ||
| 1428 | } | 1441 | } |
| 1429 | } | 1442 | } |
