From bc92e2fb972e039ee33c1f1477204a4d145a8b96 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Wed, 8 Mar 2017 17:08:32 -0800 Subject: gpu: nvgpu: Use new kmem API functions (gk20a core) Use the new kmem API functions in core gk20a code. Also add a struct gk20a pointer to several functions to ensure that the kmem APIs can be used. Bug 1799159 Bug 1823380 Change-Id: I41276509c4f0b68e80b989aa55cf94d8dbbdf156 Signed-off-by: Alex Waterman Reviewed-on: http://git-master/r/1318322 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/debug_gk20a.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/debug_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/debug_gk20a.c b/drivers/gpu/nvgpu/gk20a/debug_gk20a.c index a64bccf0..b666bb16 100644 --- a/drivers/gpu/nvgpu/gk20a/debug_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/debug_gk20a.c @@ -71,8 +71,8 @@ static void gk20a_debug_dump_all_channel_status_ramfc(struct gk20a *g, struct channel_gk20a *ch = &f->channel[chid]; if (gk20a_channel_get(ch)) { ch_state[chid] = - kmalloc(sizeof(struct ch_state) + - ram_in_alloc_size_v(), GFP_KERNEL); + nvgpu_kmalloc(g, sizeof(struct ch_state) + + ram_in_alloc_size_v()); /* ref taken stays to below loop with * successful allocs */ if (!ch_state[chid]) @@ -96,10 +96,10 @@ static void gk20a_debug_dump_all_channel_status_ramfc(struct gk20a *g, if (ch_state[chid]) { g->ops.fifo.dump_channel_status_ramfc(g, o, chid, ch_state[chid]); - kfree(ch_state[chid]); + nvgpu_kfree(g, ch_state[chid]); } } - kfree(ch_state); + nvgpu_kfree(g, ch_state); } void gk20a_debug_show_dump(struct gk20a *g, struct gk20a_debug_output *o) -- cgit v1.2.2