tegra_hv: Enable driver for Linux 6.2 and above

The driver tegra_hv was disabled for the Linux 6.2 and above
due to build failure. All build issue is fixed and re-enabling
driver for all kernel.

Bug 4370594

Change-Id: I9edef01a4f204b138204d583d9f7f61dc6112a25
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3014191
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Laxman Dewangan
2023-11-10 02:28:33 +00:00
committed by mobile promotions
parent 57f8639acb
commit af936f3b1e
2 changed files with 2 additions and 14 deletions

View File

@@ -4,19 +4,9 @@
# #
# Makefile for Hypervisor interface # Makefile for Hypervisor interface
# #
LINUX_VERSION := $(shell expr $(VERSION) \* 256 + $(PATCHLEVEL))
LINUX_VERSION_6_2 := $(shell expr 6 \* 256 + 2)
# tegra_hv is 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)
ifdef CONFIG_TEGRA_VIRTUALIZATION ifdef CONFIG_TEGRA_VIRTUALIZATION
obj-m += tegra_hv.o obj-m += tegra_hv.o
endif endif
else
tegra_hv-y = tegra-hv-dummy.o
obj-m += tegra_hv.o
endif
obj-m += tegra_hv_pm_ctl.o obj-m += tegra_hv_pm_ctl.o
obj-m += hvc_sysfs.o obj-m += hvc_sysfs.o
obj-m += ivc-cdev.o obj-m += ivc-cdev.o

View File

@@ -32,7 +32,7 @@ struct tegra_hv_ivm_cookie {
void *reserved; void *reserved;
}; };
#if (KERNEL_VERSION(6, 2, 0) > LINUX_VERSION_CODE) && defined(CONFIG_TEGRA_VIRTUALIZATION) #if defined(CONFIG_TEGRA_VIRTUALIZATION)
bool is_tegra_hypervisor_mode(void); bool is_tegra_hypervisor_mode(void);
/** /**
@@ -451,8 +451,6 @@ static inline struct tegra_ivc *tegra_hv_ivc_convert_cookie(
{ {
return ERR_PTR(-ENOTSUPP); return ERR_PTR(-ENOTSUPP);
}; };
#endif /* (KERNEL_VERSION(6, 2, 0) > LINUX_VERSION_CODE) && #endif /* defined(CONFIG_TEGRA_VIRTUALIZATION) */
* defined(CONFIG_TEGRA_VIRTUALIZATION)
*/
#endif /* __TEGRA_HV_IVC_H */ #endif /* __TEGRA_HV_IVC_H */