From b7fca01b0e01544c3a66d2e05a8b99bcb621a004 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Fri, 14 Apr 2017 13:19:04 -0700 Subject: gpu: nvgpu: Scrub gk20a_platform dependencies Remove gk20a_platform dependencies from gk20a.h. This makes gk20a_platform a Linux platform specific data structure. Add #include for platform_gk20a.h in the source files that still depend on Linux. JIRA NVGPU-16 Change-Id: Ib098accd34a1f5066eb8680c387f9b178169f3f0 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1463547 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index 4d904761..201c2090 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c @@ -41,6 +41,7 @@ #include #include "gk20a.h" +#include "platform_gk20a.h" #include "mm_gk20a.h" #include "fence_gk20a.h" #include "kind_gk20a.h" @@ -1262,16 +1263,16 @@ u64 gk20a_vm_alloc_va(struct vm_gk20a *vm, struct nvgpu_allocator *vma = vm->vma[gmmu_pgsz_idx]; u64 offset; u64 gmmu_page_size = vm->gmmu_page_sizes[gmmu_pgsz_idx]; + struct gk20a *g = vm->mm->g; if (gmmu_pgsz_idx >= gmmu_nr_page_sizes) { - dev_warn(dev_from_vm(vm), + nvgpu_warn(g, "invalid page size requested in gk20a vm alloc"); return 0; } if ((gmmu_pgsz_idx == gmmu_page_size_big) && !vm->big_pages) { - dev_warn(dev_from_vm(vm), - "unsupportd page size requested"); + nvgpu_warn(g, "unsupportd page size requested"); return 0; } -- cgit v1.2.2