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
(cherry picked from commit af936f3b1e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3059175
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@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 2ac404f410
commit e02b9efcc4
2 changed files with 3 additions and 12 deletions

View File

@@ -4,16 +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
endif
obj-m += tegra_hv_pm_ctl.o
obj-m += hvc_sysfs.o
obj-m += ivc-cdev.o

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#ifndef __TEGRA_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 */