From af936f3b1eb2bad44334c1682167b01f70e1af2e Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Fri, 10 Nov 2023 02:28:33 +0000 Subject: [PATCH] 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 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3014191 Reviewed-by: Bitan Biswas GVS: Gerrit_Virtual_Submit --- drivers/virt/tegra/Makefile | 10 ---------- include/soc/tegra/virt/hv-ivc.h | 6 ++---- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/virt/tegra/Makefile b/drivers/virt/tegra/Makefile index 01d515a4..2a0db74e 100644 --- a/drivers/virt/tegra/Makefile +++ b/drivers/virt/tegra/Makefile @@ -4,19 +4,9 @@ # # 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 obj-m += tegra_hv.o endif -else -tegra_hv-y = tegra-hv-dummy.o -obj-m += tegra_hv.o -endif obj-m += tegra_hv_pm_ctl.o obj-m += hvc_sysfs.o obj-m += ivc-cdev.o diff --git a/include/soc/tegra/virt/hv-ivc.h b/include/soc/tegra/virt/hv-ivc.h index 4dd678e3..c516edad 100644 --- a/include/soc/tegra/virt/hv-ivc.h +++ b/include/soc/tegra/virt/hv-ivc.h @@ -32,7 +32,7 @@ struct tegra_hv_ivm_cookie { 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); /** @@ -451,8 +451,6 @@ static inline struct tegra_ivc *tegra_hv_ivc_convert_cookie( { return ERR_PTR(-ENOTSUPP); }; -#endif /* (KERNEL_VERSION(6, 2, 0) > LINUX_VERSION_CODE) && - * defined(CONFIG_TEGRA_VIRTUALIZATION) - */ +#endif /* defined(CONFIG_TEGRA_VIRTUALIZATION) */ #endif /* __TEGRA_HV_IVC_H */