summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/mm/mm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/mm/mm.c')
-rw-r--r--drivers/gpu/nvgpu/common/mm/mm.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/mm.c b/drivers/gpu/nvgpu/common/mm/mm.c
index 6be619ed..54f621ae 100644
--- a/drivers/gpu/nvgpu/common/mm/mm.c
+++ b/drivers/gpu/nvgpu/common/mm/mm.c
@@ -1,4 +1,6 @@
1/* 1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
2 * Permission is hereby granted, free of charge, to any person obtaining a 4 * Permission is hereby granted, free of charge, to any person obtaining a
3 * copy of this software and associated documentation files (the "Software"), 5 * copy of this software and associated documentation files (the "Software"),
4 * to deal in the Software without restriction, including without limitation 6 * to deal in the Software without restriction, including without limitation
@@ -375,7 +377,7 @@ clean_up_vm:
375static int nvgpu_init_mm_setup_sw(struct gk20a *g) 377static int nvgpu_init_mm_setup_sw(struct gk20a *g)
376{ 378{
377 struct mm_gk20a *mm = &g->mm; 379 struct mm_gk20a *mm = &g->mm;
378 int err; 380 int err = 0;
379 381
380 if (mm->sw_ready) { 382 if (mm->sw_ready) {
381 nvgpu_log_info(g, "skip init"); 383 nvgpu_log_info(g, "skip init");
@@ -383,7 +385,11 @@ static int nvgpu_init_mm_setup_sw(struct gk20a *g)
383 } 385 }
384 386
385 mm->g = g; 387 mm->g = g;
386 nvgpu_mutex_init(&mm->l2_op_lock); 388 err = nvgpu_mutex_init(&mm->l2_op_lock);
389 if (err != 0) {
390 nvgpu_err(g, "Error in l2_op_lock mutex initialization");
391 return err;
392 }
387 393
388 /*TBD: make channel vm size configurable */ 394 /*TBD: make channel vm size configurable */
389 mm->channel.user_size = NV_MM_DEFAULT_USER_SIZE - 395 mm->channel.user_size = NV_MM_DEFAULT_USER_SIZE -