mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
The function ioremap_prot() has been exported by the Linux kernel since v5.9. However, it is only available if GENERIC_IOREMAP is enabled. Since Linux v6.0, when the ARM64 __ioremap() function was removed, was GENERIC_IOREMAP enabled for ARM64 by default. Rather than depend on kernel version for selecting if ioremap_prot is used, use ioremap_prot if GENERIC_IOREMAP is enabled. This is a better solution for working with 3rd party Linux kernels that may backport upstream changes to the kernel and hence are not compatible with these existing version checks. Bug 4119327 Change-Id: I2f5f9a691c66c5fbd83d4aa51062c749d39dd447 Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2982126 Reviewed-by: Ketan Patil <ketanp@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
55 lines
1.3 KiB
Makefile
55 lines
1.3 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0-only
|
|
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
|
|
|
|
GCOV_PROFILE := y
|
|
|
|
subdir-ccflags-y += -Werror
|
|
|
|
include $(srctree.nvidia-oot)/drivers/video/tegra/nvmap/Makefile.memory.configs
|
|
|
|
# If the kernel enables CONFIG_GENERIC_IOREMAP,
|
|
# then pass this flag for building NVMAP.
|
|
ifdef CONFIG_GENERIC_IOREMAP
|
|
ccflags-y += -DCONFIG_GENERIC_IOREMAP
|
|
endif
|
|
|
|
ifeq ($(NVMAP_CONFIG), y)
|
|
# Build NvMap only when NVMAP_CONFIG is set to y
|
|
nvmap-y := nvmap_core.o \
|
|
nvmap_alloc.o \
|
|
nvmap_cache.o \
|
|
nvmap_dev.o \
|
|
nvmap_dmabuf.o \
|
|
nvmap_fault.o \
|
|
nvmap_handle.o \
|
|
nvmap_heap.o \
|
|
nvmap_ioctl.o \
|
|
nvmap_init.o \
|
|
nvmap_tag.o \
|
|
nvmap_mm.o \
|
|
nvmap_stats.o \
|
|
nvmap_carveout.o \
|
|
nvmap_kasan_wrapper.o
|
|
nvmap-$(NVMAP_CONFIG_HANDLE_AS_ID) += nvmap_id_array.o
|
|
|
|
nvmap-$(NVMAP_CONFIG_SCIIPC) += nvmap_sci_ipc.o
|
|
|
|
ifeq ($(NVMAP_CONFIG_PAGE_POOLS), y)
|
|
nvmap-y += nvmap_pp.o
|
|
endif #NVMAP_CONFIG_PAGE_POOLS
|
|
|
|
ifneq ($(filter y,$(CONFIG_ARCH_TEGRA_19x_SOC) $(CONFIG_ARCH_TEGRA_194_SOC)),)
|
|
nvmap-y += nvmap_init_t19x.o
|
|
endif #CONFIG_ARCH_TEGRA_19x_SOC or CONFIG_ARCH_TEGRA_194_SOC
|
|
|
|
KASAN_SANITIZE_nvmap_kasan_wrapper.o := n
|
|
|
|
ifeq ($(NVMAP_CONFIG_LOADABLE_MODULE), y)
|
|
nvmap-y += nvmap_cache_maint.o
|
|
obj-m += nvmap.o
|
|
else
|
|
# Not a loadable module
|
|
obj-y += nvmap.o
|
|
endif #NVMAP_CONFIG_LOADABLE_MODULE
|
|
endif #NVMAP_CONFIG
|