gpu: nvgpu: update common.mc function and docs

- Update documentation for common.mc and gops_mc functions.
- Rename test_setup_env and test_free_env to test_mc_setup_env and
test_mc_free_env respectively. This will make sure that mc test has
independent setup and free functions.
- Add doxygen comments for mc.enable and mc.disable.
- Modify MC unit test description.

Jira NVGPU-6240

Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Change-Id: I87291ee5f90b8e3c29c475c00a78c7855de5740e
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2457183
(cherry picked from commit c62ff36f87878a8a7513bef06e111117d96c61c8)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2480602
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Vedashree Vidwans
2020-12-10 13:09:28 -08:00
committed by mobile promotions
parent d1e836f059
commit 26fc64fb0b
6 changed files with 111 additions and 93 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2019-2021, NVIDIA CORPORATION. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -197,7 +197,7 @@ static void mock_priv_ring_isr(struct gk20a *g)
u.priv_ring_isr = true;
}
int test_setup_env(struct unit_module *m,
int test_mc_setup_env(struct unit_module *m,
struct gk20a *g, void *args)
{
/* Create mc register space */
@@ -254,7 +254,7 @@ int test_setup_env(struct unit_module *m,
return UNIT_SUCCESS;
}
int test_free_env(struct unit_module *m, struct gk20a *g, void *args)
int test_mc_free_env(struct unit_module *m, struct gk20a *g, void *args)
{
/* Free mc register space */
nvgpu_posix_io_delete_reg_space(g, MC_ADDR_SPACE_START);
@@ -683,7 +683,7 @@ int test_wait_for_deferred_interrupts(struct unit_module *m, struct gk20a *g,
}
struct unit_module_test mc_tests[] = {
UNIT_TEST(mc_setup_env, test_setup_env, NULL, 0),
UNIT_TEST(mc_setup_env, test_mc_setup_env, NULL, 0),
UNIT_TEST(unit_config, test_unit_config, NULL, 2),
UNIT_TEST(pause_resume_mask, test_pause_resume_mask, NULL, 0),
UNIT_TEST(intr_stall, test_intr_stall, NULL, 0),
@@ -694,7 +694,7 @@ struct unit_module_test mc_tests[] = {
UNIT_TEST(is_intr1_pending, test_is_intr1_pending, NULL, 0),
UNIT_TEST(enable_disable_reset, test_enable_disable_reset, NULL, 0),
UNIT_TEST(wait_for_deferred_interrupts, test_wait_for_deferred_interrupts, NULL, 0),
UNIT_TEST(mc_free_env, test_free_env, NULL, 0),
UNIT_TEST(mc_free_env, test_mc_free_env, NULL, 0),
};
UNIT_MODULE(mc, mc_tests, UNIT_PRIO_NVGPU_TEST);