gpu: nvgpu: Remove bools from nvgpu_mem

Replace a couple of boolean fields in nvgpu_mem with bits in a
bitmap introduced in an earlier patch.

JIRA NVGPU-12
JIRA NVGPU-30

Change-Id: Iffc31bd629cab9a37e5a4fd13377eb9090353410
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/1464079
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
This commit is contained in:
Alex Waterman
2017-04-10 14:03:16 -07:00
committed by mobile promotions
parent 126c735d30
commit 5714f5eaaf
3 changed files with 18 additions and 7 deletions

View File

@@ -204,9 +204,7 @@ int nvgpu_dma_alloc_flags_vid_at(struct gk20a *g, unsigned long flags,
}
if (at)
mem->fixed = true;
else
mem->fixed = false;
mem->mem_flags |= NVGPU_MEM_FLAG_FIXED;
mem->priv.sgt = nvgpu_kzalloc(g, sizeof(struct sg_table));
if (!mem->priv.sgt) {
@@ -375,7 +373,7 @@ static void nvgpu_dma_free_vid(struct gk20a *g, struct nvgpu_mem *mem)
/* Sanity check - only this supported when allocating. */
WARN_ON(mem->priv.flags != NVGPU_DMA_NO_KERNEL_MAPPING);
if (mem->user_mem) {
if (mem->mem_flags & NVGPU_MEM_FLAG_USER_MEM) {
nvgpu_mutex_acquire(&g->mm.vidmem.clear_list_mutex);
was_empty = nvgpu_list_empty(&g->mm.vidmem.clear_list_head);
nvgpu_list_add_tail(&mem->clear_list_entry,