mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: re-architect nvgpu allocator functions
Currently, buddy, page and bitmap allocators have individual init() functions. This patch creates common nvgpu_alloc_allocator_init() function to trigger the individual functions based on allocator type argument. This makes writing requirements for the allocators easier. Jira NVGPU-991 Change-Id: If94e3496f46f036460ef9f1831852e6fc19d3a0b Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2097962 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
bb61fc110b
commit
8d325e9db1
@@ -38,8 +38,9 @@ void nvgpu_sec2_dmem_allocator_init(struct gk20a *g,
|
||||
~(PMU_DMEM_ALLOC_ALIGNMENT - 1U);
|
||||
u32 size = end - start;
|
||||
|
||||
nvgpu_bitmap_allocator_init(g, dmem, "sec2_dmem",
|
||||
start, size, PMU_DMEM_ALLOC_ALIGNMENT, 0U);
|
||||
nvgpu_allocator_init(g, dmem, NULL, "sec2_dmem", start,
|
||||
size, PMU_DMEM_ALLOC_ALIGNMENT, 0ULL, 0ULL,
|
||||
BITMAP_ALLOCATOR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user