[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86: teardown_msi_irq is not needed.
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1250753211 -3600 # Node ID e83bb28d48feee796837261247e0918255b42f85 # Parent 37dcd9c7877ce376b56018e79d03cc76a6e927ad x86: teardown_msi_irq is not needed. teardown_msi_irq logic is covered in destroy_irq, so remove it to avoid freeing msi resource twice. Signed-off-by: Xiantao Zhang<xiantao.zhang@xxxxxxxxx> --- xen/arch/x86/irq.c | 3 --- xen/arch/x86/msi.c | 38 -------------------------------------- 2 files changed, 41 deletions(-) diff -r 37dcd9c7877c -r e83bb28d48fe xen/arch/x86/irq.c --- a/xen/arch/x86/irq.c Thu Aug 20 08:26:16 2009 +0100 +++ b/xen/arch/x86/irq.c Thu Aug 20 08:26:51 2009 +0100 @@ -1383,9 +1383,6 @@ int unmap_domain_pirq(struct domain *d, BUG_ON(irq != domain_pirq_to_irq(d, pirq)); - if ( msi_desc ) - teardown_msi_irq(irq); - if ( !forced_unbind ) { d->arch.pirq_irq[pirq] = 0; diff -r 37dcd9c7877c -r e83bb28d48fe xen/arch/x86/msi.c --- a/xen/arch/x86/msi.c Thu Aug 20 08:26:16 2009 +0100 +++ b/xen/arch/x86/msi.c Thu Aug 20 08:26:51 2009 +0100 @@ -215,22 +215,6 @@ static int set_irq_msi(struct msi_desc * return 0; } -static int unset_irq_msi(int irq) -{ - ASSERT(spin_is_locked(&irq_desc[irq].lock)); - - if ( irq >= nr_irqs ) - { - dprintk(XENLOG_ERR, "Trying to uninstall msi data for irq %d\n", - irq); - return -EINVAL; - } - - irq_desc[irq].msi_desc = NULL; - - return 0; -} - static void write_msi_msg(struct msi_desc *entry, struct msi_msg *msg) { if ( iommu_enabled ) @@ -455,11 +439,6 @@ int setup_msi_irq(struct pci_dev *dev, s write_msi_msg(irq_desc[irq].msi_desc, &msg); return 0; -} - -void teardown_msi_irq(int irq) -{ - unset_irq_msi(irq); } int msi_free_irq(struct msi_desc *entry) @@ -780,27 +759,10 @@ static void msi_free_irqs(struct pci_dev static void msi_free_irqs(struct pci_dev* dev) { struct msi_desc *entry, *tmp; - struct irq_desc *desc; - unsigned long flags, irq; list_for_each_entry_safe( entry, tmp, &dev->msi_list, list ) { - irq = entry->irq; - desc = &irq_desc[irq]; pci_disable_msi(entry); - - spin_lock_irqsave(&desc->lock, flags); - - teardown_msi_irq(irq); - - if ( desc->handler == &pci_msi_type ) - { - /* MSI is not shared, so should be released already */ - BUG_ON(desc->status & IRQ_GUEST); - desc->handler = &no_irq_type; - } - - spin_unlock_irqrestore(&desc->lock, flags); msi_free_irq(entry); } } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |