From 555e44b283175ef740a689442a508b2faf62f247 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Wed, 8 Mar 2017 16:59:03 -0800 Subject: gpu: nvgpu: Use new kmem API functions (gp106/*) Use the new kmem API functions in gp106/*. Update lsfm_free_ucode_img_res() lsfm_free_nonpmu_ucode_img_res() to take a struct gk20a pointer so that the free can be done with nvgpu_kfree(). Bug 1799159 Bug 1823380 Change-Id: I101f5b87db6cfc7c47d88c8fb158e21947502e3a Signed-off-by: Alex Waterman Reviewed-on: http://git-master/r/1318319 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gp106/clk_gp106.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/gp106/clk_gp106.c') diff --git a/drivers/gpu/nvgpu/gp106/clk_gp106.c b/drivers/gpu/nvgpu/gp106/clk_gp106.c index 487ba3c3..8869c94b 100644 --- a/drivers/gpu/nvgpu/gp106/clk_gp106.c +++ b/drivers/gpu/nvgpu/gp106/clk_gp106.c @@ -22,6 +22,8 @@ #include #include +#include + #include "gk20a/gk20a.h" #include "clk_gp106.h" @@ -79,16 +81,15 @@ static int gp106_init_clk_support(struct gk20a *g) { nvgpu_mutex_init(&clk->clk_mutex); clk->clk_namemap = (struct namemap_cfg *) - kzalloc(sizeof(struct namemap_cfg) * NUM_NAMEMAPS, GFP_KERNEL); + nvgpu_kzalloc(g, sizeof(struct namemap_cfg) * NUM_NAMEMAPS); if (!clk->clk_namemap) return -ENOMEM; - clk->namemap_xlat_table = kcalloc(NUM_NAMEMAPS, sizeof(u32), - GFP_KERNEL); + clk->namemap_xlat_table = nvgpu_kcalloc(g, NUM_NAMEMAPS, sizeof(u32)); if (!clk->namemap_xlat_table) { - kfree(clk->clk_namemap); + nvgpu_kfree(g, clk->clk_namemap); return -ENOMEM; } -- cgit v1.2.2