diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-04-06 16:10:30 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-10 15:24:27 -0400 |
commit | 5405070ecd27ce462babc1dff231fec5cd8bd6b7 (patch) | |
tree | 903461959633aec359b5bb3f4f660c5dcb6bdbcf /drivers/gpu/nvgpu/vgpu/mm_vgpu.c | |
parent | 3a1104c3699b05201abf48ed9283bb8ccbe42732 (diff) |
gpu: nvgpu: vgpu: Use new error macros
gk20a_err() and gk20a_warn() require a struct device pointer,
which is not portable across operating systems. The new nvgpu_err()
and nvgpu_warn() macros take struct gk20a pointer. Convert code
to use the more portable macros.
JIRA NVGPU-16
Change-Id: I071e8c50959bfa81730ca964d912bc69f9c7e6ad
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1457355
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/mm_vgpu.c')
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/mm_vgpu.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/mm_vgpu.c b/drivers/gpu/nvgpu/vgpu/mm_vgpu.c index b12f8a53..3c139df5 100644 --- a/drivers/gpu/nvgpu/vgpu/mm_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/mm_vgpu.c | |||
@@ -105,7 +105,7 @@ static u64 vgpu_locked_gmmu_map(struct vm_gk20a *vm, | |||
105 | map_offset = gk20a_vm_alloc_va(vm, size, | 105 | map_offset = gk20a_vm_alloc_va(vm, size, |
106 | pgsz_idx); | 106 | pgsz_idx); |
107 | if (!map_offset) { | 107 | if (!map_offset) { |
108 | gk20a_err(d, "failed to allocate va space\n"); | 108 | nvgpu_err(g, "failed to allocate va space\n"); |
109 | err = -ENOMEM; | 109 | err = -ENOMEM; |
110 | goto fail; | 110 | goto fail; |
111 | } | 111 | } |
@@ -133,7 +133,7 @@ static u64 vgpu_locked_gmmu_map(struct vm_gk20a *vm, | |||
133 | vm->gmmu_page_sizes[gmmu_page_size_big]) { | 133 | vm->gmmu_page_sizes[gmmu_page_size_big]) { |
134 | pgsz_idx = gmmu_page_size_big; | 134 | pgsz_idx = gmmu_page_size_big; |
135 | } else { | 135 | } else { |
136 | gk20a_err(d, "invalid kernel page size %d\n", | 136 | nvgpu_err(g, "invalid kernel page size %d\n", |
137 | page_size); | 137 | page_size); |
138 | goto fail; | 138 | goto fail; |
139 | } | 139 | } |
@@ -155,7 +155,7 @@ static u64 vgpu_locked_gmmu_map(struct vm_gk20a *vm, | |||
155 | 155 | ||
156 | return map_offset; | 156 | return map_offset; |
157 | fail: | 157 | fail: |
158 | gk20a_err(d, "%s: failed with err=%d\n", __func__, err); | 158 | nvgpu_err(g, "%s: failed with err=%d\n", __func__, err); |
159 | return 0; | 159 | return 0; |
160 | } | 160 | } |
161 | 161 | ||
@@ -294,7 +294,7 @@ static int vgpu_vm_alloc_share(struct gk20a_as_share *as_share, | |||
294 | gk20a_dbg_fn(""); | 294 | gk20a_dbg_fn(""); |
295 | 295 | ||
296 | if (userspace_managed) { | 296 | if (userspace_managed) { |
297 | gk20a_err(dev_from_gk20a(g), | 297 | nvgpu_err(g, |
298 | "userspace-managed address spaces not yet supported"); | 298 | "userspace-managed address spaces not yet supported"); |
299 | return -ENOSYS; | 299 | return -ENOSYS; |
300 | } | 300 | } |
@@ -506,8 +506,7 @@ static void vgpu_mm_tlb_invalidate(struct gk20a *g, struct nvgpu_mem *pdb) | |||
506 | { | 506 | { |
507 | gk20a_dbg_fn(""); | 507 | gk20a_dbg_fn(""); |
508 | 508 | ||
509 | gk20a_err(g->dev, "%s: call to RM server not supported", | 509 | nvgpu_err(g, "call to RM server not supported"); |
510 | __func__); | ||
511 | } | 510 | } |
512 | 511 | ||
513 | static void vgpu_mm_mmu_set_debug_mode(struct gk20a *g, bool enable) | 512 | static void vgpu_mm_mmu_set_debug_mode(struct gk20a *g, bool enable) |