From f403208306c100f16daf8577b585528124f9f004 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Wed, 8 Mar 2017 16:52:11 -0800 Subject: 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 Reviewed-on: http://git-master/r/1318316 Reviewed-by: svccoveritychecker Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/clk/clk_prog.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/clk/clk_prog.c') diff --git a/drivers/gpu/nvgpu/clk/clk_prog.c b/drivers/gpu/nvgpu/clk/clk_prog.c index b4f6a464..dc9c58a6 100644 --- a/drivers/gpu/nvgpu/clk/clk_prog.c +++ b/drivers/gpu/nvgpu/clk/clk_prog.c @@ -13,6 +13,8 @@ #include +#include + #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; -- cgit v1.2.2