[PATCH v2 0/2] PCI/MSI: Clarify the IRQ sysfs ABI for PCI devices

From: Barry Song
Date: Fri Aug 20 2021 - 18:38:12 EST


From: Barry Song <song.bao.hua@xxxxxxxxxxxxx>

/sys/bus/pci/devices/.../irq has been there for many years but it has never
been documented. This patch is trying to document it. Plus, irq ABI is very
confusing at this moment especially for MSI and MSI-x cases. MSI sets irq
to the first number in the vector, but MSI-X does nothing for this though
it saves default_irq in msix_setup_entries(). Weird the saved default_irq
for MSI-X is never used in pci_msix_shutdown(), which is quite different
with pci_msi_shutdown(). Thus, this patch also moves to show the first IRQ
number which is from the first msi_entry for MSI-X. Hopefully, this can
make irq ABI more clear and more consistent.

-v2:
- split into two patches according to Bjorn's comments;
- Add Greg's Acked-by, thanks for reviewing!
-v1:
https://lore.kernel.org/lkml/20210813122650.25764-1-21cnbao@xxxxxxxxx/#t

Barry Song (2):
PCI/MSI: Fix the confusing IRQ sysfs ABI for MSI-X
Documentation: ABI: sysfs-bus-pci: Add description for IRQ entry

Documentation/ABI/testing/sysfs-bus-pci | 8 ++++++++
drivers/pci/msi.c | 6 ++++++
2 files changed, 14 insertions(+)

--
1.8.3.1