nvidia-oot: tegra_hv: add dummy driver support

For some of the kernel tegra_hv is part of core kernel and
hence it is nto required to use the OOT tegra_hv driver.

However, some packaging still expect the tegra_hv.ko from
the OOT path. To trick the packaging file, add dummy tegra_hv
driver which does not have anything other than module_init/module_exit.

Bug 4551265

Change-Id: I59f6233705e2cfb510470ae3b9c1ce7d39618330
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3197802
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
This commit is contained in:
Manish Bhardwaj
2024-09-21 10:07:27 +00:00
committed by Jon Hunter
parent 2d8579274a
commit 150beca335
3 changed files with 27 additions and 0 deletions

View File

@@ -4,3 +4,4 @@
# Kernel OOT specific environment variables to configure the OOT modules # Kernel OOT specific environment variables to configure the OOT modules
export NV_OOT_IVC_EXT_SKIP_BUILD=y export NV_OOT_IVC_EXT_SKIP_BUILD=y
export NV_OOT_TEGRA_HV_SKIP_BUILD=y

View File

@@ -5,7 +5,12 @@
# Makefile for Hypervisor interface # Makefile for Hypervisor interface
# #
ifdef CONFIG_TEGRA_VIRTUALIZATION ifdef CONFIG_TEGRA_VIRTUALIZATION
ifneq ($(NV_OOT_TEGRA_HV_SKIP_BUILD),y)
obj-m += tegra_hv.o obj-m += tegra_hv.o
else
obj-m += tegra_hv.o
tegra_hv-objs := tegra_hv_dummy.o
endif
endif 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

View File

@@ -0,0 +1,21 @@
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#include <linux/module.h>
static int __init tegra_hv_dummy_init(void)
{
pr_info("Inserting dummy tegra_hv.ko module");
return 0;
}
module_init(tegra_hv_dummy_init);
static void __exit tegra_hv_dummy_exit(void)
{
pr_info("Removing dummy tegra_hv.ko module");
}
module_exit(tegra_hv_dummy_exit);
MODULE_AUTHOR("Manish Bhardwaj <mbhardwaj@nvidia.com>");
MODULE_DESCRIPTION("Tegra HV Dummy Driver");
MODULE_LICENSE("GPL v2");