gpu: nvgpu: Use new kmem API functions (clk/*)

Use the new kmem API functions in clk/*. Also add a struct gk20a
pointer to the following functions:

  nvgpu_clk_notification_queue_alloc()
  nvgpu_clk_notification_queue_free()

Bug 1799159
Bug 1823380

Change-Id: I7eb67dc443c0bbe0d3f67dac7bf363da60e1051c
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/1318316
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
Alex Waterman
2017-03-08 16:52:11 -08:00
committed by mobile promotions
parent c11228d48b
commit f403208306
3 changed files with 45 additions and 42 deletions

View File

@@ -13,6 +13,8 @@
#include <nvgpu/bios.h>
#include <nvgpu/kmem.h>
#include "gk20a/gk20a.h"
#include "clk.h"
#include "clk_prog.h"
@@ -613,7 +615,7 @@ static u32 clk_prog_construct_1x_master(struct gk20a *g,
getslaveclk_prog_1x_master;
pclkprog->p_vf_entries = (struct ctrl_clk_clk_prog_1x_master_vf_entry *)
kzalloc(vfsize, GFP_KERNEL);
nvgpu_kzalloc(g, vfsize);
memcpy(pclkprog->p_vf_entries, ptmpprog->p_vf_entries, vfsize);
@@ -658,7 +660,7 @@ static u32 clk_prog_construct_1x_master_ratio(struct gk20a *g,
pclkprog->p_slave_entries =
(struct ctrl_clk_clk_prog_1x_master_ratio_slave_entry *)
kzalloc(slavesize, GFP_KERNEL);
nvgpu_kzalloc(g, slavesize);
if (!pclkprog->p_slave_entries)
return -ENOMEM;
@@ -699,7 +701,7 @@ static u32 clk_prog_construct_1x_master_table(struct gk20a *g,
pclkprog->p_slave_entries =
(struct ctrl_clk_clk_prog_1x_master_table_slave_entry *)
kzalloc(slavesize, GFP_KERNEL);
nvgpu_kzalloc(g, slavesize);
if (!pclkprog->p_slave_entries) {
status = -ENOMEM;