summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2017-03-08 19:51:33 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-03-26 12:55:10 -0400
commitc11228d48be1825e1ec84afd38c6938504fa4100 (patch)
treeea8bb9c874ba14b7c06a4de11d6619f88e2a4104 /drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c
parente0f2afe5eb43fb32490ccabd504879c3e3e54623 (diff)
gpu: nvgpu: Use new kmem API functions (common/*)
Use the new kmem API functions in common/* and common/mm/*. Add a struct gk20a pointer to struct nvgpu_allocator in order to store the gk20a pointer used for allocating memory. Bug 1799159 Bug 1823380 Change-Id: I881ea9545e8a8f0b75d77a1e35dd1812e0bb654e Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: http://git-master/r/1318315 Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c')
-rw-r--r--drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c b/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c
index 24a76a0b..02b7b48d 100644
--- a/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c
+++ b/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c
@@ -123,7 +123,7 @@ void nvgpu_alloc_destroy(struct nvgpu_allocator *a)
123/* 123/*
124 * Handle the common init stuff for a nvgpu_allocator. 124 * Handle the common init stuff for a nvgpu_allocator.
125 */ 125 */
126int __nvgpu_alloc_common_init(struct nvgpu_allocator *a, 126int __nvgpu_alloc_common_init(struct nvgpu_allocator *a, struct gk20a *g,
127 const char *name, void *priv, bool dbg, 127 const char *name, void *priv, bool dbg,
128 const struct nvgpu_allocator_ops *ops) 128 const struct nvgpu_allocator_ops *ops)
129{ 129{
@@ -143,6 +143,7 @@ int __nvgpu_alloc_common_init(struct nvgpu_allocator *a,
143 if (err) 143 if (err)
144 return err; 144 return err;
145 145
146 a->g = g;
146 a->ops = ops; 147 a->ops = ops;
147 a->priv = priv; 148 a->priv = priv;
148 a->debug = dbg; 149 a->debug = dbg;