video: tegra: nvmap: Add missing vmalloc.h

After removing nvmap_priv.h, nvmap no longer builds for Linux v6.10+
kernels and error such as the following are observed ...

 drivers/video/tegra/nvmap/nvmap_alloc.c:41:24: error: implicit
 declaration of function 'vzalloc'; did you mean 'kzalloc'?
 [-Werror=implicit-function-declaration]
   41 |                 return vzalloc(len);
      |                        ^~~~~~~
      |                        kzalloc
 drivers/video/tegra/nvmap/nvmap_alloc.c:52:17:
 error: implicit declaration of function 'vfree'; did you mean
 'kvfree'? [-Werror=implicit-function-declaration]
   52 |                 vfree(ptr);
      |                 ^~~~~
      |                 kvfree

Fix this by including vmalloc.h in the necessary files.

JIRA TMM-5751

Change-Id: I49fae7ea5a78f0029706c2bd12b5553e5903f31b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3243752
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
This commit is contained in:
Jon Hunter
2024-11-05 13:55:15 +00:00
parent a6898e3968
commit 4dd9cd92d4
3 changed files with 4 additions and 1 deletions

View File

@@ -16,6 +16,7 @@
#include <linux/libnvdimm.h>
#include <linux/rtmutex.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include "nvmap_stats.h"
#include "nvmap_dev.h"
#include "nvmap_alloc.h"
@@ -581,4 +582,4 @@ void nvmap_alloc_free(struct page **pages, unsigned int nr_page, bool from_va,
phys_addr_t nvmap_alloc_get_co_base(struct nvmap_handle *h)
{
return h->carveout->base;
}
}

View File

@@ -20,6 +20,7 @@
#include <linux/slab.h>
#include <linux/nvmap.h>
#include <linux/version.h>
#include <linux/vmalloc.h>
#include <linux/wait.h>
#include <soc/tegra/fuse.h>
#include <asm/pgtable.h>

View File

@@ -26,6 +26,7 @@
#include <linux/dma-mapping.h>
#include <linux/dma-map-ops.h>
#include <linux/rtmutex.h>
#include <linux/vmalloc.h>
#include "nvmap_dev.h"
#include "nvmap_alloc.h"
#include "nvmap_handle.h"