From a8e38dd72d1028624d5e8741b1bb600d2593039f Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Wed, 14 Dec 2022 19:26:10 +0000 Subject: [PATCH] gpu: nvgpu: Fix OOT build for Linux v5.14 For building NVGPU as an out-of-tree we support Linux v5.14+ kernels. NVGPU is no longer building as an out-of-tree module for v5.14 because the tegra-ivc.h header is not found. Update the driver for use the appropriate header for Linux v5.14. Bug 3812973 Signed-off-by: Jon Hunter Change-Id: I268ca8a56d04f1801200ff7fb6838b670a0c48d5 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2828088 Reviewed-by: Dinesh T Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-cert Reviewed-by: Alex Waterman GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/common/cbc/contig_pool.c | 2 +- drivers/gpu/nvgpu/os/linux/nvgpu_ivm.c | 2 +- drivers/gpu/nvgpu/os/linux/soc.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/nvgpu/common/cbc/contig_pool.c b/drivers/gpu/nvgpu/common/cbc/contig_pool.c index 572902955..139224572 100644 --- a/drivers/gpu/nvgpu/common/cbc/contig_pool.c +++ b/drivers/gpu/nvgpu/common/cbc/contig_pool.c @@ -24,7 +24,7 @@ #ifdef __KERNEL__ #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0) #include #else #include diff --git a/drivers/gpu/nvgpu/os/linux/nvgpu_ivm.c b/drivers/gpu/nvgpu/os/linux/nvgpu_ivm.c index 026669a7f..1de72294d 100644 --- a/drivers/gpu/nvgpu/os/linux/nvgpu_ivm.c +++ b/drivers/gpu/nvgpu/os/linux/nvgpu_ivm.c @@ -15,7 +15,7 @@ */ #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0) #include #else #include diff --git a/drivers/gpu/nvgpu/os/linux/soc.c b/drivers/gpu/nvgpu/os/linux/soc.c index 75d4bc354..294f01fd0 100644 --- a/drivers/gpu/nvgpu/os/linux/soc.c +++ b/drivers/gpu/nvgpu/os/linux/soc.c @@ -15,7 +15,7 @@ #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) #include #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0) #include #else #include @@ -50,7 +50,7 @@ bool nvgpu_is_hypervisor_mode(struct gk20a *g) bool nvgpu_is_soc_t194_a01(struct gk20a *g) { -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0) struct device *dev = dev_from_gk20a(g); struct gk20a_platform *platform = gk20a_get_platform(dev);