From 556643179f1223555e352b48be31df3eda9390b6 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Mon, 18 Apr 2016 12:35:57 -0700 Subject: gpu: nvgpu: Allocate channel table with vmalloc Channel table can be bigger than one page, so allocate it with vmalloc. Also add a free for tsg table, which did not exist before, and remove per-channel remove_channel callback which was never used. JIRA DNVGPU-50 Change-Id: I3ee84b65d94881df52bf0618bf4c5f2e85758223 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1129244 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Ken Adams GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/vgpu/fifo_vgpu.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'drivers/gpu/nvgpu/vgpu/fifo_vgpu.c') diff --git a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c index 294581b9..dc82d57b 100644 --- a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c @@ -267,10 +267,8 @@ static int vgpu_init_fifo_setup_sw(struct gk20a *g) gk20a_dbg(gpu_dbg_map, "userd bar1 va = 0x%llx", f->userd.gpu_va); - f->channel = kzalloc(f->num_channels * sizeof(*f->channel), - GFP_KERNEL); - f->tsg = kzalloc(f->num_channels * sizeof(*f->tsg), - GFP_KERNEL); + f->channel = vzalloc(f->num_channels * sizeof(*f->channel)); + f->tsg = vzalloc(f->num_channels * sizeof(*f->tsg)); f->engine_info = kzalloc(f->max_engines * sizeof(*f->engine_info), GFP_KERNEL); @@ -315,9 +313,9 @@ clean_up: memset(&f->userd, 0, sizeof(f->userd)); - kfree(f->channel); + vfree(f->channel); f->channel = NULL; - kfree(f->tsg); + vfree(f->tsg); f->tsg = NULL; kfree(f->engine_info); f->engine_info = NULL; -- cgit v1.2.2