From 15e5a85ae2ae9dc5278df59c8dd298236359cab3 Mon Sep 17 00:00:00 2001 From: Sachit Kadle Date: Mon, 17 Oct 2016 16:13:07 -0700 Subject: gpu: nvgpu: fixes for 32-bit compatibility Fixes to fence framework's usage of allocator APIs to be compatible w/ 32-bit architectures. Bug 1795076 Change-Id: Ia677f9842c36d482d4e82e9fa09613702f3111b3 Signed-off-by: Sachit Kadle Reviewed-on: http://git-master/r/1237904 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/fence_gk20a.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu') diff --git a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c index c11d363e..7228f6f7 100644 --- a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c @@ -50,7 +50,7 @@ static void gk20a_fence_free(struct kref *ref) if (f->allocator) { if (gk20a_alloc_initialized(f->allocator)) - gk20a_free(f->allocator, (u64)f); + gk20a_free(f->allocator, (size_t)f); } else kfree(f); } @@ -130,7 +130,7 @@ int gk20a_alloc_fence_pool(struct channel_gk20a *c, int count) return -ENOMEM; err = gk20a_lockless_allocator_init(&c->fence_allocator, - "fence_pool", (u64)fence_pool, size, + "fence_pool", (size_t)fence_pool, size, sizeof(struct gk20a_fence), 0); if (err) goto fail; @@ -145,7 +145,8 @@ fail: void gk20a_free_fence_pool(struct channel_gk20a *c) { if (gk20a_alloc_initialized(&c->fence_allocator)) { - void *base = (void *)gk20a_alloc_base(&c->fence_allocator); + void *base = (void *)(uintptr_t) + gk20a_alloc_base(&c->fence_allocator); gk20a_alloc_destroy(&c->fence_allocator); vfree(base); @@ -158,7 +159,7 @@ struct gk20a_fence *gk20a_alloc_fence(struct channel_gk20a *c) if (channel_gk20a_is_prealloc_enabled(c)) { if (gk20a_alloc_initialized(&c->fence_allocator)) { - fence = (struct gk20a_fence *) + fence = (struct gk20a_fence *)(uintptr_t) gk20a_alloc(&c->fence_allocator, sizeof(struct gk20a_fence)); -- cgit v1.2.2