video: tegra: nvmap: Fix build for Linux v6.15

In Linux v6.15, the function ioremap_prot() was updated to pass a
variable of type pgprot_t instead of an unsigned long. Add a conftest
test to check for this and update the NVMAP driver accordlingly to fix
the build for Linux v6.15.

JIRA LINQPJ14-47

Change-Id: Icff9f63bf5c914997b69076435dd9e2432f343a3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3332454
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Jon Hunter
2025-02-24 13:23:48 +00:00
parent 585f64d7df
commit 0d6655f480
4 changed files with 30 additions and 2 deletions

View File

@@ -157,6 +157,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += i2c_mux_add_adapter_has_no_class_argument
NV_CONFTEST_FUNCTION_COMPILE_TESTS += iio_dev_opaque_has_mlock
NV_CONFTEST_FUNCTION_COMPILE_TESTS += iommu_map_has_gfp_arg
NV_CONFTEST_FUNCTION_COMPILE_TESTS += iommu_paging_domain_alloc
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ioremap_prot_has_pgprot_t_arg
NV_CONFTEST_FUNCTION_COMPILE_TESTS += irq_get_nr_irqs
NV_CONFTEST_FUNCTION_COMPILE_TESTS += kthread_complete_and_exit
NV_CONFTEST_FUNCTION_COMPILE_TESTS += mii_bus_struct_has_read_c45

View File

@@ -7702,6 +7702,24 @@ compile_test() {
compile_check_conftest "$CODE" "NV_IOMMU_MAP_HAS_GFP_ARG" "" "types"
;;
ioremap_prot_has_pgprot_t_arg)
#
# Determine if pgprot_t is passed to ioremap_prot()
#
# In Linux v6.15, commit 86758b504864 ("mm/ioremap: pass pgprot_t to
# ioremap_prot() instead of unsigned long") updated ioremap_prot() to
# pass pgprot_t.
#
CODE="
#include <linux/io.h>
void conftest_ioremap_prot_has_pgprot_t_arg(phys_addr_t phys_addr,
size_t size, pgprot_t prot) {
ioremap_prot(phys_addr, size, prot);
}"
compile_check_conftest "$CODE" "NV_IOREMAP_PROT_HAS_PGPROT_T_ARG" "" "types" $1
;;
iio_dev_opaque_has_mlock)
#
# Determine if the 'iio_dev_opaque' structure has 'mlock' field.