aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/msi.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2021-12-06 23:27:26 +0100
committerThomas Gleixner <tglx@linutronix.de>2021-12-09 11:52:20 +0100
commit29bbc35e29d9b6347780dcacde2deb4b39344167 (patch)
tree0fd7865df0cd98ebba12edf03623816e537d9a0b /include/linux/msi.h
parentpowerpc/4xx: Complete removal of MSI support (diff)
downloadlinux-dev-29bbc35e29d9b6347780dcacde2deb4b39344167.tar.xz
linux-dev-29bbc35e29d9b6347780dcacde2deb4b39344167.zip
PCI/MSI: Fix pci_irq_vector()/pci_irq_get_affinity()
pci_irq_vector() and pci_irq_get_affinity() use the list position to find the MSI-X descriptor at a given index. That's correct for the normal case where the entry number is the same as the list position. But it's wrong for cases where MSI-X was allocated with an entries array describing sparse entry numbers into the hardware message descriptor table. That's inconsistent at best. Make it always check the entry number because that's what the zero base index really means. This change won't break existing users which use a sparse entries array for allocation because these users retrieve the Linux interrupt number from the entries array after allocation and none of them uses pci_irq_vector() or pci_irq_get_affinity(). Fixes: aff171641d18 ("PCI: Provide sensible IRQ vector alloc/free routines") Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Juergen Gross <jgross@suse.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://lore.kernel.org/r/20211206210223.929792157@linutronix.de
Diffstat (limited to 'include/linux/msi.h')
0 files changed, 0 insertions, 0 deletions