From ba2014d367339e77f8035e087c870032c510fd61 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Thu, 30 Jun 2016 10:22:48 -0700 Subject: gpu: nvgpu: Implement a bitmap allocator Implement a bitmap allocator for GPU use. This allocator is useful for managing memory (or resource) regions where the buddy allocator is not ideal. Some instances are small regions or where the resource management must not make calls to the kernel's memory allocation routines (anything that ultimately calls alloc_page()). The code path where this avoidance of alloc_page() is most required is the gpfifo submit path. In order to keep this routine fast and have predicable time constraints no alloc_page() calls is necessary. The buddy allocator does not work for this since every time a buddy is allocated there is the possibility that a pair (or more) buddy structs have to be made. These allocs could perhaps require a call into alloc_page() if there is not enouch space in the kmem_cache slab for the buddy structs. Change-Id: Ia46fce62d4bdafcebbc153b21b515cb51641d241 Signed-off-by: Alex Waterman Reviewed-on: http://git-master/r/1176446 Reviewed-by: Yu-Huan Hsu --- drivers/gpu/nvgpu/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/gpu/nvgpu/Makefile') diff --git a/drivers/gpu/nvgpu/Makefile b/drivers/gpu/nvgpu/Makefile index a9a0f92f..1cf2ea37 100644 --- a/drivers/gpu/nvgpu/Makefile +++ b/drivers/gpu/nvgpu/Makefile @@ -53,6 +53,7 @@ nvgpu-y := \ gk20a/hal.o \ gk20a/hal_gk20a.o \ gk20a/gk20a_allocator.o \ + gk20a/gk20a_allocator_bitmap.o \ gk20a/gk20a_allocator_buddy.o \ gk20a/cde_gk20a.o \ gk20a/platform_gk20a_generic.o \ -- cgit v1.2.2