diff options
author | Alex Waterman <alexw@nvidia.com> | 2016-10-04 17:04:01 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-02-10 14:57:31 -0500 |
commit | cf0ef133e6e3075c808bb3f553b35e94fc000afd (patch) | |
tree | 13cace143fe43034791570514a05bf06cfcc47cb /drivers/gpu/nvgpu/Makefile.nvgpu | |
parent | 24e8ee192a02ff75a569f8c734efa9b4b5267fc8 (diff) |
gpu: nvgpu: Move kmem_caches to allocator
Instead of using a single static kmem_cache for each type of
data structure the allocators may want to allocate each
allocator now has its own instance of the kmem_cache. This is
done so that each GPU driver instance can accurately track how
much memory it is using.
In order to support this on older kernels a new NVGPU API has
been made,
nvgpu_kmem_cache_create(struct gk20a *g, size_t size)
To handle the possibility that caches cannot be created with
the same name.
This patch also fixes numerous places where kfree() was wrongly
used to free kmem_cache allocs.
Bug 1799159
Bug 1823380
Change-Id: Id674f9a5445fde3f95db65ad6bf3ea990444603d
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/1283826
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/Makefile.nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/Makefile.nvgpu | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/Makefile.nvgpu b/drivers/gpu/nvgpu/Makefile.nvgpu index c3c5fa8c..9a061493 100644 --- a/drivers/gpu/nvgpu/Makefile.nvgpu +++ b/drivers/gpu/nvgpu/Makefile.nvgpu | |||
@@ -24,6 +24,7 @@ endif | |||
24 | obj-$(CONFIG_GK20A) := nvgpu.o | 24 | obj-$(CONFIG_GK20A) := nvgpu.o |
25 | 25 | ||
26 | nvgpu-y := \ | 26 | nvgpu-y := \ |
27 | common/linux/kmem.o \ | ||
27 | common/linux/timers.o \ | 28 | common/linux/timers.o \ |
28 | common/mm/nvgpu_allocator.o \ | 29 | common/mm/nvgpu_allocator.o \ |
29 | common/mm/bitmap_allocator.o \ | 30 | common/mm/bitmap_allocator.o \ |