summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorNipun Gupta <nipun.gupta@amd.com>2024-04-23 16:40:20 +0530
committerAlex Williamson <alex.williamson@redhat.com>2024-04-23 14:27:52 -0600
commit06fe8fd6808562971637c6b133c806bcf49097ad (patch)
tree3250a674f9e7ec5ea53889c4e143ab8db385aff5 /kernel
parent82b951e6fbd31d85ae7f4feb5f00ddd4c5d256e2 (diff)
downloadlinux-stable-06fe8fd6808562971637c6b133c806bcf49097ad.tar.gz
linux-stable-06fe8fd6808562971637c6b133c806bcf49097ad.tar.bz2
linux-stable-06fe8fd6808562971637c6b133c806bcf49097ad.zip
genirq/msi: Add MSI allocation helper and export MSI functions
MSI functions for allocation and free can be directly used by the device drivers without any wrapper provided by bus drivers. So export these MSI functions. Also, add a wrapper API to allocate MSIs providing only the number of interrupts rather than range for simpler driver usage. Signed-off-by: Nipun Gupta <nipun.gupta@amd.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20240423111021.1686144-1-nipun.gupta@amd.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/irq/msi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c
index f90952ebc494..2024f89baea4 100644
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -1434,6 +1434,7 @@ int msi_domain_alloc_irqs_range(struct device *dev, unsigned int domid,
msi_unlock_descs(dev);
return ret;
}
+EXPORT_SYMBOL_GPL(msi_domain_alloc_irqs_range);
/**
* msi_domain_alloc_irqs_all_locked - Allocate all interrupts from a MSI interrupt domain
@@ -1680,6 +1681,7 @@ void msi_domain_free_irqs_range(struct device *dev, unsigned int domid,
msi_domain_free_irqs_range_locked(dev, domid, first, last);
msi_unlock_descs(dev);
}
+EXPORT_SYMBOL_GPL(msi_domain_free_irqs_all);
/**
* msi_domain_free_irqs_all_locked - Free all interrupts from a MSI interrupt domain