genirq/msi: Provide interface to retrieve Linux interrupt number
authorThomas Gleixner <tglx@linutronix.de>
Fri, 10 Dec 2021 22:19:23 +0000 (23:19 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 16 Dec 2021 21:16:40 +0000 (22:16 +0100)
commitcf15f43acaad31dabb2646cef170a506a1d663eb
treeedf03c996e5ceb82d3523f4494ae581fb7d8107e
parent651b39c48813acac2b77850014390f4062a4835d
genirq/msi: Provide interface to retrieve Linux interrupt number

This allows drivers to retrieve the Linux interrupt number instead of
fiddling with MSI descriptors.

msi_get_virq() returns the Linux interrupt number or 0 in case that there
is no entry for the given MSI index.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Michael Kelley <mikelley@microsoft.com>
Tested-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20211210221814.780824745@linutronix.de
include/linux/msi.h
kernel/irq/msi.c