mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 02:52:51 +03:00
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>
This commit is contained in:
committed by
mobile promotions
parent
0a1e7c6b09
commit
15e5a85ae2
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user