diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-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 | ||