Files
linux-nv-oot/Makefile
Laxman Dewangan 4ef0a332e8 nvmap: Pass proper argument for get_file_rcu() for Linux 6.7
The function get_file_rcu() has modification in its
argument to take the pointer to pointer of file from
Linux 6.7 from below change
***
commit 0ede61d8589cc2d93aa78230d74ac58b5b8d0244
Author: Christian Brauner <brauner@kernel.org>

    file: convert to SLAB_TYPESAFE_BY_RCU
***

Add support for Linux 6.7.

Bug 4346767

Change-Id: I1e2e005900c7d2c57ac487b5f6ac5e1fcbfbafe7
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3020000
Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-23 11:09:38 -08:00

119 lines
3.9 KiB
Makefile

# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2022-2023, NVIDIA CORPORATION. All rights reserved.
LINUXINCLUDE += -I$(srctree.nvconftest)
LINUXINCLUDE += -I$(srctree.nvidia-oot)/include
subdir-ccflags-y += -Werror
LINUX_VERSION := $(shell expr $(VERSION) \* 256 + $(PATCHLEVEL))
LINUX_VERSION_6_2 := $(shell expr 6 \* 256 + 2)
LINUX_VERSION_6_3 := $(shell expr 6 \* 256 + 3)
LINUX_VERSION_6_4 := $(shell expr 6 \* 256 + 4)
LINUX_VERSION_6_6 := $(shell expr 6 \* 256 + 6)
LINUX_VERSION_6_7 := $(shell expr 6 \* 256 + 7)
# The Tegra IVC driver was updated to support iosys-map in Linux v6.2.
# For Linux v6.2 kernels, don't build any drivers that requires this.
ifeq ($(shell test $(LINUX_VERSION) -ge $(LINUX_VERSION_6_2); echo $$?),0)
export CONFIG_TEGRA_IVC_LEGACY_DISABLE=y
endif
ifeq ($(CONFIG_TEGRA_IVC_LEGACY_DISABLE),y)
subdir-ccflags-y += -DCONFIG_TEGRA_IVC_LEGACY_DISABLE
endif
# Legacy GPIO support is removed in Linux v6.3
ifeq ($(shell test $(LINUX_VERSION) -ge $(LINUX_VERSION_6_3); echo $$?),0)
export CONFIG_TEGRA_GPIO_LEGACY_DISABLE=y
# Setting VM flag via API vm_flags_set
subdir-ccflags-y += -DNV_VM_FLAG_SET_API_AVAILABLE
endif
# Changes done in Linux 6.4 onwards
ifeq ($(shell test $(LINUX_VERSION) -ge $(LINUX_VERSION_6_4); echo $$?),0)
# Argument on class attribute callback changed to constant type
subdir-ccflags-y += -DNV_CLASS_ATTRIBUTE_STRUCT_HAS_CONST_STRUCT_CLASS_ARG
endif
# Changes done in Linux 6.6 onwards
ifeq ($(shell test $(LINUX_VERSION) -ge $(LINUX_VERSION_6_6); echo $$?),0)
# Move probe to DAI Ops.
export CONFIG_SND_SOC_MOVE_DAI_PROBE_TO_OPS=y
subdir-ccflags-y += -DNV_SND_SOC_DAI_OPS_STRUCT_HAS_PROBE_ARG
# probe_new is removed from i2c driver structure
subdir-ccflags-y += -DNV_I2C_LEGACY_PROBE_NEW_REMOVED
# API changes to replace u8 with unsigned char
subdir-ccflags-y += -DNV_TTY_SERIAL_TYPE_U8_CHANGE
# v4l2_async_subdev is renamed to v4l2_async_connection.
subdir-ccflags-y += -DNV_V4L2_ASYNC_SUBDEV_RENAME
# Rename V4L2_ASYNC_MATCH_FWNODE to V4L2_ASYNC_MATCH_TYPE_FWNODE
subdir-ccflags-y += -DNV_V4L2_ASYNC_MATCH_FWNODE_RENAME
# Rename async_nf_init and v4l2_async_subdev_nf_register
subdir-ccflags-y += -DNV_V4L2_ASYNC_NF_SUBDEVICE_INIT_RENAME
# Deprecate PCIED Error reporting pci_enable_pcie_error_reporting
subdir-ccflags-y += -DNV_DROP_PCIE_ERROR_REPORTING
# Split types and declaration of net/page_pool.h
subdir-ccflags-y += -DNV_SPLIT_PAGE_POOL_HEADER
# Unexport helpers for fd/handle conversion
subdir-ccflags-y += -DNV_UNEXPORT_FD_HANDLE_CONVERSION
# FB Deferred IO helpers name alignment
subdir-ccflags-y += -DNV_FB_DEFERRED_IO_OPS_RENAME
# Drop the API for pcie_disable_pcie_error_reporting
subdir-ccflags-y += -DNV_PCIE_DIABLE_PCIE_ERROR_REPORTING_DROP
# PCIE DMA EPF core deinit not implemented in core kernel
subdir-ccflags-y += -DNV_PCIE_DMA_EPF_CORE_DEINIT_NOT_AVAILABLE
# PCIE EPF driver probe has additional argument as ID
subdir-ccflags-y += -DNV_PCIE_EFP_DRIVER_PROBE_HAS_ID_ARG
# Crypto driver has major change in it ops, skip it
export CONFIG_SKIP_CRYPTO=y
endif
# Changes done in Linux 6.7 onwards
ifeq ($(shell test $(LINUX_VERSION) -ge $(LINUX_VERSION_6_7); echo $$?),0)
subdir-ccflags-y += -DNV_ASOC_XXX_DROP
# drm_debugfs_remove_files has root argument
subdir-ccflags-y += -DNV_DRM_DEBUGFS_REMOVE_HAS_ROOT_ARGS
# pwm ops has dropped the .owner member
subdir-ccflags-y += -DNV_PWM_OPS_HAS_NO_OWNER
# get_file_rcu() have change the argument
subdir-ccflags-y += -DNV_GET_FILE_RCU_HAS_PTR_FILE_ARGS
endif
ifeq ($(CONFIG_TEGRA_VIRTUALIZATION),y)
subdir-ccflags-y += -DCONFIG_TEGRA_VIRTUALIZATION
endif
ifeq ($(CONFIG_TEGRA_SYSTEM_TYPE_ACK),y)
subdir-ccflags-y += -DCONFIG_TEGRA_SYSTEM_TYPE_ACK
subdir-ccflags-y += -Wno-sometimes-uninitialized
subdir-ccflags-y += -Wno-parentheses-equality
subdir-ccflags-y += -Wno-enum-conversion
subdir-ccflags-y += -Wno-implicit-fallthrough
endif
obj-m += drivers/
ifdef CONFIG_SND_SOC
obj-m += sound/soc/tegra/
obj-m += sound/tegra-safety-audio/
obj-m += sound/soc/tegra-virt-alt/
endif