mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
genirq/msi: Make msi_get_virq() device domain aware
In preparation of the upcoming per device multi MSI domain support, change the interface to support lookups based on domain id and zero based index within the domain. Signed-off-by: Ahmed S. Darwish <darwi@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Acked-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20221124230314.044613697@linutronix.de
This commit is contained in:
committed by
Thomas Gleixner
parent
94ff94cfea
commit
98043704f3
@@ -18,6 +18,18 @@ enum msi_domain_ids {
|
||||
MSI_MAX_DEVICE_IRQDOMAINS,
|
||||
};
|
||||
|
||||
unsigned int msi_get_virq(struct device *dev, unsigned int index);
|
||||
unsigned int msi_domain_get_virq(struct device *dev, unsigned int domid, unsigned int index);
|
||||
|
||||
/**
|
||||
* msi_get_virq - Lookup the Linux interrupt number for a MSI index on the default interrupt domain
|
||||
* @dev: Device for which the lookup happens
|
||||
* @index: The MSI index to lookup
|
||||
*
|
||||
* Return: The Linux interrupt number on success (> 0), 0 if not found
|
||||
*/
|
||||
static inline unsigned int msi_get_virq(struct device *dev, unsigned int index)
|
||||
{
|
||||
return msi_domain_get_virq(dev, MSI_DEFAULT_DOMAIN, index);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user