From c6affb85ba10d4f64e1b68f29d43554c4faf16f2 Mon Sep 17 00:00:00 2001 From: Philip Elcan Date: Wed, 23 Oct 2019 11:25:00 -0400 Subject: [PATCH] gpu: nvgpu: unit: init: cleanup quiesce The init unit test starts the quiesce feature during testing. This includes starting the quiesce thread. The thread should be stopped when the init unit tests complete, so call nvgpu_sw_quiesce_remove_support() when complete. Bug 2732985 Change-Id: I701e1dd1ce753781fa81327e3cdc7e2881a33d00 Signed-off-by: Philip Elcan Reviewed-on: https://git-master.nvidia.com/r/2224307 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Thomas Fleury Reviewed-by: Vijayakumar Subbu Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/libnvgpu-drv_safe.export | 1 + userspace/units/init/nvgpu-init.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/gpu/nvgpu/libnvgpu-drv_safe.export b/drivers/gpu/nvgpu/libnvgpu-drv_safe.export index 1b2135fdd..58fbccd7b 100644 --- a/drivers/gpu/nvgpu/libnvgpu-drv_safe.export +++ b/drivers/gpu/nvgpu/libnvgpu-drv_safe.export @@ -384,6 +384,7 @@ nvgpu_spinlock_acquire nvgpu_spinlock_init nvgpu_spinlock_release nvgpu_sw_quiesce +nvgpu_sw_quiesce_remove_support nvgpu_thread_create nvgpu_thread_create_priority nvgpu_thread_is_running diff --git a/userspace/units/init/nvgpu-init.c b/userspace/units/init/nvgpu-init.c index a55ea6651..71a14c73e 100644 --- a/userspace/units/init/nvgpu-init.c +++ b/userspace/units/init/nvgpu-init.c @@ -159,6 +159,9 @@ int test_free_env(struct unit_module *m, nvgpu_posix_io_delete_reg_space(g, mc_boot_0_r()); nvgpu_posix_io_delete_reg_space(g, GP10B_FUSE_REG_BASE); + /* Clean up quiesce thread */ + nvgpu_sw_quiesce_remove_support(g); + return UNIT_SUCCESS; }