diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a_allocator.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_allocator.c b/drivers/gpu/nvgpu/gk20a/gk20a_allocator.c index fee3e4ea..0037257c 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_allocator.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a_allocator.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include "gk20a_allocator.h" | 19 | #include "gk20a_allocator.h" |
20 | #include <linux/vmalloc.h> | ||
20 | 21 | ||
21 | /* init allocator struct */ | 22 | /* init allocator struct */ |
22 | int gk20a_allocator_init(struct gk20a_allocator *allocator, | 23 | int gk20a_allocator_init(struct gk20a_allocator *allocator, |
@@ -29,8 +30,7 @@ int gk20a_allocator_init(struct gk20a_allocator *allocator, | |||
29 | allocator->base = start; | 30 | allocator->base = start; |
30 | allocator->limit = start + len - 1; | 31 | allocator->limit = start + len - 1; |
31 | 32 | ||
32 | allocator->bitmap = kzalloc(BITS_TO_LONGS(len) * sizeof(long), | 33 | allocator->bitmap = vzalloc(BITS_TO_LONGS(len) * sizeof(long)); |
33 | GFP_KERNEL); | ||
34 | if (!allocator->bitmap) | 34 | if (!allocator->bitmap) |
35 | return -ENOMEM; | 35 | return -ENOMEM; |
36 | 36 | ||
@@ -50,7 +50,7 @@ void gk20a_allocator_destroy(struct gk20a_allocator *allocator) | |||
50 | { | 50 | { |
51 | down_write(&allocator->rw_sema); | 51 | down_write(&allocator->rw_sema); |
52 | 52 | ||
53 | kfree(allocator->bitmap); | 53 | vfree(allocator->bitmap); |
54 | 54 | ||
55 | memset(allocator, 0, sizeof(struct gk20a_allocator)); | 55 | memset(allocator, 0, sizeof(struct gk20a_allocator)); |
56 | } | 56 | } |