mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
PCI: Fix endpoint DMA test for Linux v6.9
Building the PCI EPF DMA test driver for Linux v6.9 is failing because the parameters for the pci_epf_alloc_space() function has been updated to pass the alignment value via the 'pci_epc_features' structure instead of passing the value directly. Instead of hard-coding the endpoint alignment in the EPF DMA test driver use the 'pcie_epc_get_features()' function to retrieve the endpoint features structure which has the endpoint alignment. By using the conftest script to detect the parameters for the pci_epf_alloc_space() function, we can then pass the appropriate arguments to the pci_epf_alloc_space() function. Bug 4471899 Change-Id: Id80259a4c90d6f6ae2132cccbec1a96113d22be7 Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3116548 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
6b355b554a
commit
971680aadb
@@ -146,6 +146,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += pwm_ops_struct_has_config
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_epc_event_ops_struct_has_core_deinit
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_disable_pcie_error_reporting
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_enable_pcie_error_reporting
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_epf_alloc_space_has_epc_features_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_epf_driver_struct_probe_has_id_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_epc_irq_type_enum_present
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += register_shrinker_has_fmt_arg
|
||||
|
||||
@@ -7386,6 +7386,28 @@ compile_test() {
|
||||
compile_check_conftest "$CODE" "NV_PCI_ENABLE_PCIE_ERROR_REPORTING_PRESENT" "" "functions"
|
||||
;;
|
||||
|
||||
pci_epf_alloc_space_has_epc_features_arg)
|
||||
#
|
||||
# Determine if the function pci_epf_alloc_space() has a
|
||||
# 'epc_features' argument.
|
||||
#
|
||||
# Commit e891becdccaa ("PCI: endpoint: Refactor
|
||||
# pci_epf_alloc_space() API") updated the pci_epf_alloc_space()
|
||||
# function to accept 'epc_features' as a parameter in Linux v6.9.
|
||||
#
|
||||
CODE="
|
||||
#include <linux/pci-epc.h>
|
||||
#include <linux/pci-epf.h>
|
||||
void conftest_pci_epf_alloc_space_has_epc_features_arg(
|
||||
struct pci_epf *epf, size_t size, enum pci_barno bar,
|
||||
const struct pci_epc_features *epc_features,
|
||||
enum pci_epc_interface_type type) {
|
||||
pci_epf_alloc_space(epf, size, bar, epc_features, type);
|
||||
}"
|
||||
|
||||
compile_check_conftest "$CODE" "NV_PCI_EPF_ALLOC_SPACE_HAS_EPC_FEATURES_ARG" "" "types"
|
||||
;;
|
||||
|
||||
pci_epf_driver_struct_probe_has_id_arg)
|
||||
#
|
||||
# Determine if the struct pci_epf_driver probe API has ID argument or not.
|
||||
|
||||
Reference in New Issue
Block a user