From 57d240e0078f18edb0798022b5f9957b02f95916 Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Tue, 21 May 2024 09:21:22 +0100 Subject: [PATCH] nv-virtio-poc: Add missing header In Linux v6.10 the nv-virtio-poc driver fails to build and the following error is seen ... drivers/nv-virtio/nv-virtio-console-poc.c:277:13: error: implicit declaration of function 'remap_pfn_range'; did you mean 'vmap_page_range'? [-Werror=implicit-function-declaration] 277 | if (remap_pfn_range(vma, vma->vm_start, ipa_pfn, | ^~~~~~~~~~~~~~~ | vmap_page_range Upstream commit 22bcc915ae91 ("kfifo: don't use "proxy" headers") updated some kernel headers to only 'include what is used' and exposed that the nv-virtio-poc driver is not explicitly including 'linux/mm.h'. The function remap_pfn_range() has been defined in 'linux/mm.h' since Linux v2.6 and so fix this by always including 'linux/mm.h'. Bug 4593750 Change-Id: Ic43b22ca51bbc16e2085d146d28e40c21206ae2f Signed-off-by: Jon Hunter Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142213 (cherry picked from commit ef52cefdda6567844a081d373a80c7fd7bd837bb) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142202 Reviewed-by: Brad Griffis GVS: buildbot_gerritrpt --- drivers/nv-virtio/nv-virtio-console-poc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/nv-virtio/nv-virtio-console-poc.c b/drivers/nv-virtio/nv-virtio-console-poc.c index 129af344..192abbfb 100644 --- a/drivers/nv-virtio/nv-virtio-console-poc.c +++ b/drivers/nv-virtio/nv-virtio-console-poc.c @@ -1,7 +1,5 @@ -/* - * SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: GPL-2.0 - */ +// SPDX-FileCopyrightText: Copyright (c) 2023-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// SPDX-License-Identifier: GPL-2.0-only #include @@ -15,6 +13,7 @@ #include #include #include +#include #include #include