summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.h27
1 files changed, 0 insertions, 27 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
index d7f6cb9a..5b96726f 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
@@ -791,33 +791,6 @@ int gk20a_big_pages_possible(struct vm_gk20a *vm, u64 base, u64 size);
791extern const struct gk20a_mmu_level gk20a_mm_levels_64k[]; 791extern const struct gk20a_mmu_level gk20a_mm_levels_64k[];
792extern const struct gk20a_mmu_level gk20a_mm_levels_128k[]; 792extern const struct gk20a_mmu_level gk20a_mm_levels_128k[];
793 793
794static inline void *nvgpu_kalloc(size_t size, bool clear)
795{
796 void *p;
797
798 if (size > PAGE_SIZE) {
799 if (clear)
800 p = vzalloc(size);
801 else
802 p = vmalloc(size);
803 } else {
804 if (clear)
805 p = kzalloc(size, GFP_KERNEL);
806 else
807 p = kmalloc(size, GFP_KERNEL);
808 }
809
810 return p;
811}
812
813static inline void nvgpu_kfree(void *p)
814{
815 if (virt_addr_valid(p))
816 kfree(p);
817 else
818 vfree(p);
819}
820
821int gk20a_mm_get_buffer_info(struct device *dev, int dmabuf_fd, 794int gk20a_mm_get_buffer_info(struct device *dev, int dmabuf_fd,
822 u64 *buffer_id, u64 *buffer_len); 795 u64 *buffer_id, u64 *buffer_len);
823 796