drivers/misc/mods: Disable broken MODS drivers for Linux v6.2+

Upstream Linux commit 4c1e0a97351a ("firmware: tegra: bpmp: Use
iosys-map helpers") updated the Tegra IVC driver to use the
iosys-map helpers for Linux v6.2. This causes the MODS BPMPIPC driver
build to fail.

Upstream Linux commit 55bf84fd0a76 ("firmware: arm_ffa: Remove
ffa_dev_ops_get()") removes the function ffa_dev_ops_get() and this
causes the MODS FFA driver build to fail.

Temporarily disable the building of these drivers while these build
issues are fixed.

Bug 3936429
Bug 3974855

Change-Id: I1b40bbb4b89fe0c8d4af7fc642664d29d6954ed2
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2861317
Tested-by: Rohit Khanna <rokhanna@nvidia.com>
Reviewed-by: Rohit Khanna <rokhanna@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Jon Hunter
2023-02-21 15:11:49 +00:00
committed by Laxman Dewangan
parent 74ee35918c
commit 7881a907e5
2 changed files with 18 additions and 0 deletions

View File

@@ -3,6 +3,9 @@
ccflags-y += -I$(srctree.nvidia)/include
ccflags-y += -DMODS_HAS_TEGRA
LINUX_VERSION := $(shell expr $(VERSION) \* 256 + $(PATCHLEVEL))
LINUX_VERSION_6_2 := $(shell expr 6 \* 256 + 2)
ifeq ($(CONFIG_TEGRA_OOT_MODULE),m)
CONFIG_MODS := m
endif
@@ -15,8 +18,12 @@ mods-y += mods_mem.o
mods-$(CONFIG_ACPI) += mods_acpi.o
mods-$(CONFIG_TEGRA_NVADSP) += mods_adsp.o
# mods_arm_ffa and mods_bpmpipc are currently broken for Linux v6.2
# and so skip for Linux v6.2+
ifeq ($(shell test $(LINUX_VERSION) -lt $(LINUX_VERSION_6_2); echo $$?),0)
mods-$(CONFIG_ARM_FFA_TRANSPORT) += mods_arm_ffa.o
mods-$(CONFIG_TEGRA_IVC) += mods_bpmpipc.o
endif
mods-$(CONFIG_COMMON_CLK) += mods_clock.o
mods-$(CONFIG_DEBUG_FS) += mods_debugfs.o
mods-$(CONFIG_DMA_ENGINE) += mods_dma.o

View File

@@ -29,6 +29,7 @@
#include <linux/random.h>
#include <linux/sched.h>
#include <linux/uaccess.h>
#include <linux/version.h>
#ifdef MODS_HAS_CONSOLE_LOCK
# include <linux/console.h>
# include <linux/kd.h>
@@ -488,9 +489,11 @@ static int __init mods_init_module(void)
#endif
#if defined(CONFIG_ARM_FFA_TRANSPORT)
#if (KERNEL_VERSION(6, 2, 0) > LINUX_VERSION_CODE)
rc = mods_ffa_abi_register();
if (rc < 0)
mods_warning_printk("error on mods_ffa_abi_register returned %d\n", rc);
#endif
#endif
mods_info_printk("*** WARNING: DIAGNOSTIC DRIVER LOADED ***\n");
@@ -534,7 +537,9 @@ static void __exit mods_exit_module(void)
#endif
#if defined(CONFIG_ARM_FFA_TRANSPORT)
#if (KERNEL_VERSION(6, 2, 0) > LINUX_VERSION_CODE)
mods_ffa_abi_unregister();
#endif
#endif
mods_info_printk("driver unloaded\n");
@@ -1035,7 +1040,9 @@ static int mods_krnl_close(struct inode *ip, struct file *fp)
#endif
#if defined(CONFIG_TEGRA_IVC)
#if (KERNEL_VERSION(6, 2, 0) > LINUX_VERSION_CODE)
mods_bpmpipc_cleanup();
#endif
#endif
mods_disable_all_devices(client);
@@ -2660,9 +2667,11 @@ static long mods_krnl_ioctl(struct file *fp,
#endif
#if defined(CONFIG_ARM_FFA_TRANSPORT)
#if (KERNEL_VERSION(6, 2, 0) > LINUX_VERSION_CODE)
case MODS_ESC_FFA_CMD:
MODS_IOCTL(MODS_ESC_FFA_CMD, esc_mods_arm_ffa_cmd, MODS_FFA_PARAMS);
break;
#endif
#endif
case MODS_ESC_ACQUIRE_ACCESS_TOKEN:
@@ -2735,11 +2744,13 @@ static long mods_krnl_ioctl(struct file *fp,
break;
#ifdef CONFIG_TEGRA_IVC
#if (KERNEL_VERSION(6, 2, 0) > LINUX_VERSION_CODE)
case MODS_ESC_BPMP_UPHY_LANE_EOM_SCAN:
MODS_IOCTL(MODS_ESC_BPMP_UPHY_LANE_EOM_SCAN,
esc_mods_bpmp_uphy_lane_eom_scan,
MODS_BPMP_UPHY_LANE_EOM_SCAN_PARAMS);
break;
#endif
#endif
default: