mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
x86: fix msi_free_irq().
1) We should invoke destroy_irq() before msix_put_fixmap(). 2) destroy_irq() invokes mask_msi_irq() eventually, so we can remove the duplicate mask operation in the 'if' statement here. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
This commit is contained in:
1 parent
4062d9c27b
commit
fbed278604
1 file changed
+1
-4
+1
-4
@@ -443,17 +443,14 @@ int setup_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int irq)
|
||||
|
||||
int msi_free_irq(struct msi_desc *entry)
|
||||
{
|
||||
destroy_irq(entry->irq);
|
||||
if ( entry->msi_attrib.type == PCI_CAP_ID_MSIX )
|
||||
{
|
||||
unsigned long start;
|
||||
|
||||
writel(1, entry->mask_base + PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET);
|
||||
|
||||
start = (unsigned long)entry->mask_base & ~(PAGE_SIZE - 1);
|
||||
msix_put_fixmap(entry->dev, virt_to_fix(start));
|
||||
}
|
||||
list_del(&entry->list);
|
||||
destroy_irq(entry->irq);
|
||||
xfree(entry);
|
||||
return 0;
|
||||
}
|
||||
|
||||