PCI/portdrv: Do not setup up IRQs if there are no users
authorJan Kiszka <jan.kiszka@siemens.com>
Mon, 30 Aug 2021 08:08:10 +0000 (10:08 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 20 Sep 2021 20:09:14 +0000 (15:09 -0500)
commit0e8ae5a6ff5952253cd7cc0260df838ab4c21009
tree551ddd9e818e7c5bfd652384603f25ef9637447f
parente4e737bb5c170df6135a127739a9e6148ee3da82
PCI/portdrv: Do not setup up IRQs if there are no users

Avoid registering service IRQs if there is no service that offers them
or no driver to register a handler against them. This saves IRQ vectors
when they are limited (e.g. on x86) and also avoids that spurious events
could hit a missing handler. Such spurious events need to be generated
by the Jailhouse hypervisor for active MSI vectors when enabling or
disabling itself.

Link: https://lore.kernel.org/r/8f9a13ac-8ab1-15ac-06cb-c131b488a36f@siemens.com
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pcie/portdrv_core.c