diff options
author | Seema Khowala <seemaj@nvidia.com> | 2018-09-04 16:38:28 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-09-14 18:34:03 -0400 |
commit | 356ebcef230466c05ad8e478a50271218b9a40ad (patch) | |
tree | 3c238e4a13876fd52ad0c0d7cb35ada4512990f2 | |
parent | 0ece054d13a67ab01a1074bd7f06f941593251dc (diff) |
gpu: nvgpu: dump falcon stats for fecs watchdog
After fecs watchdog gets triggered, system will not
do anything useful as it cannot context switch. Dumping
falcon stats will help debug the issue since s/w is
not triggering recovery.
Bug 2113657
Change-Id: I03ccd5ad7c03daac0581775dc615174cc0e77328
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1812720
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
5 files changed, 24 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index b94eade1..a9a87a54 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -5288,10 +5288,16 @@ int gk20a_gr_handle_fecs_error(struct gk20a *g, struct channel_gk20a *ch, | |||
5288 | gk20a_readl(g, gr_fecs_ctxsw_mailbox_r(6)), | 5288 | gk20a_readl(g, gr_fecs_ctxsw_mailbox_r(6)), |
5289 | isr_data->data_lo); | 5289 | isr_data->data_lo); |
5290 | ret = -1; | 5290 | ret = -1; |
5291 | } else if ((gr_fecs_intr & | ||
5292 | gr_fecs_host_int_status_watchdog_active_f()) != 0U) { | ||
5293 | /* currently, recovery is not initiated */ | ||
5294 | nvgpu_err(g, "fecs watchdog triggered for channel %u, " | ||
5295 | "cannot ctxsw anymore !!", isr_data->chid); | ||
5296 | gk20a_fecs_dump_falcon_stats(g); | ||
5291 | } else { | 5297 | } else { |
5292 | nvgpu_err(g, | 5298 | nvgpu_err(g, |
5293 | "fecs error interrupt 0x%08x for channel %u", | 5299 | "fecs error interrupt 0x%08x for channel %u", |
5294 | gr_fecs_intr, isr_data->chid); | 5300 | gr_fecs_intr, isr_data->chid); |
5295 | } | 5301 | } |
5296 | 5302 | ||
5297 | gk20a_writel(g, gr_fecs_host_int_clear_r(), gr_fecs_intr); | 5303 | gk20a_writel(g, gr_fecs_host_int_clear_r(), gr_fecs_intr); |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gk20a/hw_gr_gk20a.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gk20a/hw_gr_gk20a.h index 8655a0d3..826108f1 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gk20a/hw_gr_gk20a.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gk20a/hw_gr_gk20a.h | |||
@@ -996,6 +996,10 @@ static inline u32 gr_fecs_host_int_status_umimp_illegal_method_f(u32 v) | |||
996 | { | 996 | { |
997 | return (v & 0x1U) << 18U; | 997 | return (v & 0x1U) << 18U; |
998 | } | 998 | } |
999 | static inline u32 gr_fecs_host_int_status_watchdog_active_f(void) | ||
1000 | { | ||
1001 | return 0x80000U; | ||
1002 | } | ||
999 | static inline u32 gr_fecs_host_int_status_ctxsw_intr_f(u32 v) | 1003 | static inline u32 gr_fecs_host_int_status_ctxsw_intr_f(u32 v) |
1000 | { | 1004 | { |
1001 | return (v & 0xffffU) << 0U; | 1005 | return (v & 0xffffU) << 0U; |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gm20b/hw_gr_gm20b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gm20b/hw_gr_gm20b.h index be05d031..5bbb3b9f 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gm20b/hw_gr_gm20b.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gm20b/hw_gr_gm20b.h | |||
@@ -1012,6 +1012,10 @@ static inline u32 gr_fecs_host_int_status_umimp_illegal_method_f(u32 v) | |||
1012 | { | 1012 | { |
1013 | return (v & 0x1U) << 18U; | 1013 | return (v & 0x1U) << 18U; |
1014 | } | 1014 | } |
1015 | static inline u32 gr_fecs_host_int_status_watchdog_active_f(void) | ||
1016 | { | ||
1017 | return 0x80000U; | ||
1018 | } | ||
1015 | static inline u32 gr_fecs_host_int_status_ctxsw_intr_f(u32 v) | 1019 | static inline u32 gr_fecs_host_int_status_ctxsw_intr_f(u32 v) |
1016 | { | 1020 | { |
1017 | return (v & 0xffffU) << 0U; | 1021 | return (v & 0xffffU) << 0U; |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_gr_gp10b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_gr_gp10b.h index efd8b555..f7bc4c23 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_gr_gp10b.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_gr_gp10b.h | |||
@@ -1200,6 +1200,10 @@ static inline u32 gr_fecs_host_int_status_umimp_illegal_method_f(u32 v) | |||
1200 | { | 1200 | { |
1201 | return (v & 0x1U) << 18U; | 1201 | return (v & 0x1U) << 18U; |
1202 | } | 1202 | } |
1203 | static inline u32 gr_fecs_host_int_status_watchdog_active_f(void) | ||
1204 | { | ||
1205 | return 0x80000U; | ||
1206 | } | ||
1203 | static inline u32 gr_fecs_host_int_status_ctxsw_intr_f(u32 v) | 1207 | static inline u32 gr_fecs_host_int_status_ctxsw_intr_f(u32 v) |
1204 | { | 1208 | { |
1205 | return (v & 0xffffU) << 0U; | 1209 | return (v & 0xffffU) << 0U; |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h index 588452cd..36a7ebf5 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h | |||
@@ -2032,6 +2032,10 @@ static inline u32 gr_fecs_host_int_status_umimp_illegal_method_f(u32 v) | |||
2032 | { | 2032 | { |
2033 | return (v & 0x1U) << 18U; | 2033 | return (v & 0x1U) << 18U; |
2034 | } | 2034 | } |
2035 | static inline u32 gr_fecs_host_int_status_watchdog_active_f(void) | ||
2036 | { | ||
2037 | return 0x80000U; | ||
2038 | } | ||
2035 | static inline u32 gr_fecs_host_int_status_ctxsw_intr_f(u32 v) | 2039 | static inline u32 gr_fecs_host_int_status_ctxsw_intr_f(u32 v) |
2036 | { | 2040 | { |
2037 | return (v & 0xffffU) << 0U; | 2041 | return (v & 0xffffU) << 0U; |