mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
Build the Tegra PCI EPF driver fails with Linux v5.14 because the pci_epf_alloc/free_space() have the incorrect number of arguments. The arguments to the pci_epf_alloc/free_space() functions were updated in Linux v5.12 but the current Tegra PCI EPF driver assumes that they were updating after Linux v5.14. Update the Tegra PCI EPF driver to use the correct arguments for v5.12 onwards. Bug 3820317 Change-Id: Ieba44bfc22e0f978a5ff227b6d07a6a56ad23f3b Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2791670 Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
38 lines
1.5 KiB
C
38 lines
1.5 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* PCIe EDMA Framework
|
|
*
|
|
* Copyright (C) 2022 NVIDIA Corporation. All rights reserved.
|
|
*/
|
|
|
|
#ifndef PCI_EPF_WRAPPER_H
|
|
#define PCI_EPF_WRAPPER_H
|
|
|
|
#include <linux/version.h>
|
|
|
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0))
|
|
#define lpci_epf_free_space(A, B, C) pci_epf_free_space(A, B, C, PRIMARY_INTERFACE)
|
|
#define lpci_epf_alloc_space(A, B, C, D) pci_epf_alloc_space(A, B, C, D, PRIMARY_INTERFACE)
|
|
#else
|
|
#define lpci_epf_free_space(A, B, C) pci_epf_free_space(A, B, C)
|
|
#define lpci_epf_alloc_space(A, B, C, D) pci_epf_alloc_space(A, B, C, D)
|
|
#endif
|
|
|
|
#if (LINUX_VERSION_CODE > KERNEL_VERSION(5, 14, 0))
|
|
#define lpci_epc_write_header(A, B, C) pci_epc_write_header(A, B, 0, C)
|
|
#define lpci_epc_raise_irq(A, B, C, D) pci_epc_raise_irq(A, B, 0, C, D)
|
|
#define lpci_epc_clear_bar(A, B, C) pci_epc_clear_bar(A, B, 0, C)
|
|
#define lpci_epc_set_msi(A, B, C) pci_epc_set_msi(A, B, 0, C)
|
|
#define lpci_epc_set_bar(A, B, C) pci_epc_set_bar(A, B, 0, C)
|
|
#define lpci_epc_unmap_addr(A, B, C) pci_epc_unmap_addr(A, B, 0, C)
|
|
#else
|
|
#define lpci_epc_write_header(A, B, C) pci_epc_write_header(A, B, C)
|
|
#define lpci_epc_raise_irq(A, B, C, D) pci_epc_raise_irq(A, B, C, D)
|
|
#define lpci_epc_clear_bar(A, B, C) pci_epc_clear_bar(A, B, C)
|
|
#define lpci_epc_set_msi(A, B, C) pci_epc_set_msi(A, B, C)
|
|
#define lpci_epc_set_bar(A, B, C) pci_epc_set_bar(A, B, C)
|
|
#define lpci_epc_unmap_addr(A, B, C) pci_epc_unmap_addr(A, B, C)
|
|
#endif /* LINUX_VERSION_CODE */
|
|
|
|
#endif /* PCI_EPF_WRAPPER_H */
|