summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp106/sec2_gp106.c
diff options
context:
space:
mode:
authorMahantesh Kumbar <mkumbar@nvidia.com>2017-10-20 07:00:42 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-11-20 03:34:15 -0500
commit1ab4754c052b639427f38202860d064c2fa03b57 (patch)
tree0d7740707f0a1c602d1838f256aed07778f6fba4 /drivers/gpu/nvgpu/gp106/sec2_gp106.c
parent9d04e970937657d11620d812c29a5d10828440fc (diff)
gpu: nvgpu: Kill pg init thread if pmu boot fails
- Created nvgpu_kill_task_pg_init() method to set pmu state to PMU_STATE_EXIT & make thread stop, and poll to confirm thread stopped. - Check for PMU/SEC2 ACR secure boot completion status & initiate pg init thread kill if ACR boot exits with error, which fails to validate & boot LS-PMU. - Set pmu state to PMU_STATE_OFF after thread kill during ACR boot failure. Issue: pg init task blocks if PMU boot fails & cause kernel to show message "task nvgpu_pg_init_g:2120 blocked for more than 120 seconds" Bug 200346134 Change-Id: I5270426080dcd628ccca4df798005294c19767a0 Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1582593 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp106/sec2_gp106.c')
-rw-r--r--drivers/gpu/nvgpu/gp106/sec2_gp106.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gp106/sec2_gp106.c b/drivers/gpu/nvgpu/gp106/sec2_gp106.c
index 26ded39e..332ac794 100644
--- a/drivers/gpu/nvgpu/gp106/sec2_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/sec2_gp106.c
@@ -52,20 +52,26 @@ int sec2_wait_for_halt(struct gk20a *g, unsigned int timeout)
52 completion = nvgpu_flcn_wait_for_halt(&g->sec2_flcn, timeout); 52 completion = nvgpu_flcn_wait_for_halt(&g->sec2_flcn, timeout);
53 if (completion) { 53 if (completion) {
54 nvgpu_err(g, "ACR boot timed out"); 54 nvgpu_err(g, "ACR boot timed out");
55 return completion; 55 goto exit;
56 } 56 }
57 57
58 g->acr.capabilities = gk20a_readl(g, psec_falcon_mailbox1_r()); 58 g->acr.capabilities = gk20a_readl(g, psec_falcon_mailbox1_r());
59 gm20b_dbg_pmu("ACR capabilities %x\n", g->acr.capabilities); 59 gm20b_dbg_pmu("ACR capabilities %x\n", g->acr.capabilities);
60 data = gk20a_readl(g, psec_falcon_mailbox0_r()); 60 data = gk20a_readl(g, psec_falcon_mailbox0_r());
61 if (data) { 61 if (data) {
62
63 nvgpu_err(g, "ACR boot failed, err %x", data); 62 nvgpu_err(g, "ACR boot failed, err %x", data);
64 completion = -EAGAIN; 63 completion = -EAGAIN;
64 goto exit;
65 } 65 }
66 66
67 init_pmu_setup_hw1(g); 67 init_pmu_setup_hw1(g);
68 68
69exit:
70 if (completion) {
71 nvgpu_kill_task_pg_init(g);
72 nvgpu_pmu_state_change(g, PMU_STATE_OFF, false);
73 }
74
69 return completion; 75 return completion;
70} 76}
71 77