• Eric W. Biederman's avatar
    msi: Kill msi_lookup_irq · ded86d8d
    Eric W. Biederman authored
    The function msi_lookup_irq was horrible.  As a side effect of running
    it changed dev->irq, and then the callers would need to change it
    back.  In addition it does a global scan through all of the irqs,
    which seems to be the sole justification of the msi_lock.
    
    To remove the neede for msi_lookup_irq I added first_msi_irq to struct
    pci_dev.  Then depending on the context I replaced msi_lookup_irq with
    dev->first_msi_irq, dev->msi_enabled, or dev->msix_enabled.
    
    msi_enabled and msix_enabled were already present in pci_dev for other
    reasons.
    Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
    Acked-by: default avatarIngo Molnar <mingo@elte.hu>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    ded86d8d
msi.c 22.9 KB