diff options
author | Sachit Kadle <skadle@nvidia.com> | 2016-10-17 19:13:07 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2016-10-20 11:14:47 -0400 |
commit | 15e5a85ae2ae9dc5278df59c8dd298236359cab3 (patch) | |
tree | 23462202d5900dc11d231166fd2e6572e4451cd1 /drivers/gpu/nvgpu/gk20a | |
parent | 0a1e7c6b0905a6e3dcdcd483565fb5cb6f6bdd38 (diff) |
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 <skadle@nvidia.com>
Reviewed-on: http://git-master/r/1237904
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fence_gk20a.c | 9 |
1 files changed, 5 insertions, 4 deletions
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) | |||
50 | 50 | ||
51 | if (f->allocator) { | 51 | if (f->allocator) { |
52 | if (gk20a_alloc_initialized(f->allocator)) | 52 | if (gk20a_alloc_initialized(f->allocator)) |
53 | gk20a_free(f->allocator, (u64)f); | 53 | gk20a_free(f->allocator, (size_t)f); |
54 | } else | 54 | } else |
55 | kfree(f); | 55 | kfree(f); |
56 | } | 56 | } |
@@ -130,7 +130,7 @@ int gk20a_alloc_fence_pool(struct channel_gk20a *c, int count) | |||
130 | return -ENOMEM; | 130 | return -ENOMEM; |
131 | 131 | ||
132 | err = gk20a_lockless_allocator_init(&c->fence_allocator, | 132 | err = gk20a_lockless_allocator_init(&c->fence_allocator, |
133 | "fence_pool", (u64)fence_pool, size, | 133 | "fence_pool", (size_t)fence_pool, size, |
134 | sizeof(struct gk20a_fence), 0); | 134 | sizeof(struct gk20a_fence), 0); |
135 | if (err) | 135 | if (err) |
136 | goto fail; | 136 | goto fail; |
@@ -145,7 +145,8 @@ fail: | |||
145 | void gk20a_free_fence_pool(struct channel_gk20a *c) | 145 | void gk20a_free_fence_pool(struct channel_gk20a *c) |
146 | { | 146 | { |
147 | if (gk20a_alloc_initialized(&c->fence_allocator)) { | 147 | if (gk20a_alloc_initialized(&c->fence_allocator)) { |
148 | void *base = (void *)gk20a_alloc_base(&c->fence_allocator); | 148 | void *base = (void *)(uintptr_t) |
149 | gk20a_alloc_base(&c->fence_allocator); | ||
149 | 150 | ||
150 | gk20a_alloc_destroy(&c->fence_allocator); | 151 | gk20a_alloc_destroy(&c->fence_allocator); |
151 | vfree(base); | 152 | vfree(base); |
@@ -158,7 +159,7 @@ struct gk20a_fence *gk20a_alloc_fence(struct channel_gk20a *c) | |||
158 | 159 | ||
159 | if (channel_gk20a_is_prealloc_enabled(c)) { | 160 | if (channel_gk20a_is_prealloc_enabled(c)) { |
160 | if (gk20a_alloc_initialized(&c->fence_allocator)) { | 161 | if (gk20a_alloc_initialized(&c->fence_allocator)) { |
161 | fence = (struct gk20a_fence *) | 162 | fence = (struct gk20a_fence *)(uintptr_t) |
162 | gk20a_alloc(&c->fence_allocator, | 163 | gk20a_alloc(&c->fence_allocator, |
163 | sizeof(struct gk20a_fence)); | 164 | sizeof(struct gk20a_fence)); |
164 | 165 | ||