gpu: nvgpu: pmu: update init APIs

Remove the second parameter for the pmu_early_init() and pmu_init()
functions so they only require the gk20a object. The g->pmu was always
passed for this parameter. And this makes the API signature match the
other init functions in the driver.

JIRA NVGPU-3980

Change-Id: Iae9361a5f14bc5c1d02f4ddb6583f30b71b22d59
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2202968
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Philip Elcan
2019-09-19 15:17:33 -04:00
committed by Alex Waterman
parent 78c1f328bb
commit b53ec4731e
6 changed files with 21 additions and 23 deletions

View File

@@ -154,7 +154,7 @@ static int test_pmu_early_init(struct unit_module *m,
* allocation failure
*/
nvgpu_posix_enable_fault_injection(kmem_fi, true, 0);
err = nvgpu_pmu_early_init(g, &g->pmu);
err = nvgpu_pmu_early_init(g);
if (err != -ENOMEM) {
unit_return_fail(m,
@@ -165,7 +165,7 @@ static int test_pmu_early_init(struct unit_module *m,
nvgpu_pmu_remove_support(g, g->pmu);
/* Case 2: nvgpu_pmu_early_init() passes */
err = nvgpu_pmu_early_init(g, &g->pmu);
err = nvgpu_pmu_early_init(g);
if (err != 0) {
unit_return_fail(m, "nvgpu_pmu_early_init failed\n");
}
@@ -175,7 +175,7 @@ static int test_pmu_early_init(struct unit_module *m,
/* case 3: */
g->support_ls_pmu = false;
err = nvgpu_pmu_early_init(g, &g->pmu);
err = nvgpu_pmu_early_init(g);
if (err != 0) {
unit_return_fail(m, "support_ls_pmu failed\n");
}
@@ -185,7 +185,7 @@ static int test_pmu_early_init(struct unit_module *m,
/* case 4: */
g->support_ls_pmu = true;
g->ops.pmu.is_pmu_supported = stub_gv11b_is_pmu_supported;
err = nvgpu_pmu_early_init(g, &g->pmu);
err = nvgpu_pmu_early_init(g);
if (g->support_ls_pmu != false || g->can_elpg != false ||
g->elpg_enabled != false || g->aelpg_enabled != false) {
@@ -203,7 +203,7 @@ static int test_pmu_remove_support(struct unit_module *m,
{
int err;
err = nvgpu_pmu_early_init(g, &g->pmu);
err = nvgpu_pmu_early_init(g);
if (err != 0) {
unit_return_fail(m, "support_ls_pmu failed\n");
}
@@ -228,7 +228,7 @@ static int test_pmu_reset(struct unit_module *m,
}
/* initialize PMU */
err = nvgpu_pmu_early_init(g, &g->pmu);
err = nvgpu_pmu_early_init(g);
if (err != 0) {
unit_return_fail(m, "nvgpu_pmu_early_init failed\n");
}