diff options
author | Alex Waterman <alexw@nvidia.com> | 2017-03-08 19:59:03 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-03-28 12:39:07 -0400 |
commit | 555e44b283175ef740a689442a508b2faf62f247 (patch) | |
tree | 45ecfc2570754676099e3a7ba4355018ef810ddc /drivers/gpu/nvgpu/gp106/clk_gp106.c | |
parent | 2e15a2d1accb8303c2363122c638e08ae7b70a50 (diff) |
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 <alexw@nvidia.com>
Reviewed-on: http://git-master/r/1318319
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp106/clk_gp106.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp106/clk_gp106.c | 9 |
1 files changed, 5 insertions, 4 deletions
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 @@ | |||
22 | #include <linux/uaccess.h> | 22 | #include <linux/uaccess.h> |
23 | #include <soc/tegra/fuse.h> | 23 | #include <soc/tegra/fuse.h> |
24 | 24 | ||
25 | #include <nvgpu/kmem.h> | ||
26 | |||
25 | #include "gk20a/gk20a.h" | 27 | #include "gk20a/gk20a.h" |
26 | 28 | ||
27 | #include "clk_gp106.h" | 29 | #include "clk_gp106.h" |
@@ -79,16 +81,15 @@ static int gp106_init_clk_support(struct gk20a *g) { | |||
79 | nvgpu_mutex_init(&clk->clk_mutex); | 81 | nvgpu_mutex_init(&clk->clk_mutex); |
80 | 82 | ||
81 | clk->clk_namemap = (struct namemap_cfg *) | 83 | clk->clk_namemap = (struct namemap_cfg *) |
82 | kzalloc(sizeof(struct namemap_cfg) * NUM_NAMEMAPS, GFP_KERNEL); | 84 | nvgpu_kzalloc(g, sizeof(struct namemap_cfg) * NUM_NAMEMAPS); |
83 | 85 | ||
84 | if (!clk->clk_namemap) | 86 | if (!clk->clk_namemap) |
85 | return -ENOMEM; | 87 | return -ENOMEM; |
86 | 88 | ||
87 | clk->namemap_xlat_table = kcalloc(NUM_NAMEMAPS, sizeof(u32), | 89 | clk->namemap_xlat_table = nvgpu_kcalloc(g, NUM_NAMEMAPS, sizeof(u32)); |
88 | GFP_KERNEL); | ||
89 | 90 | ||
90 | if (!clk->namemap_xlat_table) { | 91 | if (!clk->namemap_xlat_table) { |
91 | kfree(clk->clk_namemap); | 92 | nvgpu_kfree(g, clk->clk_namemap); |
92 | return -ENOMEM; | 93 | return -ENOMEM; |
93 | } | 94 | } |
94 | 95 | ||