mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
pci: Add conftest to determine if msi_get_virq() present
The API msi_get_virq() get added by commit 98043704f375 ("genirq/msi:
Make msi_get_virq() device domain aware") in Linux v6.1. Use
conftest to determine if this API is available or not.
Jira HOSTX-5375
Change-Id: I5e4cef9622d852fc889d9652e6631a79f2d21f9b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3166766
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
b260a8f442
commit
00a95facef
@@ -292,7 +292,7 @@ static void pcie_dma_epf_unbind(struct pci_epf *epf)
|
||||
struct pcie_epf_bar *epf_bar = (struct pcie_epf_bar *)epfnv->bar_virt;
|
||||
struct device *cdev = epc->dev.parent;
|
||||
struct platform_device *pdev = of_find_device_by_node(cdev->of_node);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0)
|
||||
#if !defined(NV_MSI_GET_VIRQ_PRESENT) /* Linux v6.1 */
|
||||
struct msi_desc *desc;
|
||||
#endif
|
||||
enum pci_barno bar;
|
||||
@@ -309,7 +309,7 @@ static void pcie_dma_epf_unbind(struct pci_epf *epf)
|
||||
#if defined(NV_PLATFORM_MSI_DOMAIN_FREE_IRQS_PRESENT) /* Linux v6.9 */
|
||||
platform_msi_domain_free_irqs(&pdev->dev);
|
||||
#endif
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
|
||||
#if defined(NV_MSI_GET_VIRQ_PRESENT) /* Linux v6.1 */
|
||||
irq = msi_get_virq(&pdev->dev, 0);
|
||||
#else
|
||||
for_each_msi_entry(desc, cdev) {
|
||||
@@ -355,7 +355,7 @@ static int pcie_dma_epf_bind(struct pci_epf *epf)
|
||||
struct pcie_epf_bar *epf_bar_virt;
|
||||
struct pci_epf_bar *epf_bar;
|
||||
struct irq_domain *domain;
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0)
|
||||
#if !defined(NV_MSI_GET_VIRQ_PRESENT) /* Linux v6.1 */
|
||||
struct msi_desc *desc;
|
||||
#endif
|
||||
enum pci_barno bar;
|
||||
@@ -425,7 +425,7 @@ static int pcie_dma_epf_bind(struct pci_epf *epf)
|
||||
goto fail_kasnprintf;
|
||||
}
|
||||
#endif
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
|
||||
#if defined(NV_MSI_GET_VIRQ_PRESENT) /* Linux v6.1 */
|
||||
epfnv->edma.msi_irq = msi_get_virq(&pdev->dev, 1);
|
||||
irq = msi_get_virq(&pdev->dev, 0);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user