mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: handle replayable mmu fault during waiting for SM lockdown
outstanding replayable mmu fault will prevent SM from lockdown, so handle the replayable mmu fault while polling lockdown status. Jira EVLR-2643 Bug 200405202 Change-Id: I811f16ef4394a6cc42a5f37a17e426dd749c5652 Signed-off-by: Richard Zhao <rizhao@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1741997 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Tejal Kudav
parent
d6c9f9f170
commit
7a5d498a71
@@ -1289,6 +1289,18 @@ void gv11b_fb_handle_dropped_mmu_fault(struct gk20a *g, u32 fault_status)
|
||||
}
|
||||
}
|
||||
|
||||
void gv11b_fb_handle_replayable_mmu_fault(struct gk20a *g)
|
||||
{
|
||||
u32 fault_status = gk20a_readl(g, fb_mmu_fault_status_r());
|
||||
|
||||
if (!(fault_status & fb_mmu_fault_status_replayable_m()))
|
||||
return;
|
||||
|
||||
if (gv11b_fb_is_fault_buf_enabled(g, NONREPLAY_REG_INDEX)) {
|
||||
gv11b_fb_handle_mmu_nonreplay_replay_fault(g,
|
||||
fault_status, REPLAY_REG_INDEX);
|
||||
}
|
||||
}
|
||||
|
||||
static void gv11b_fb_handle_mmu_fault(struct gk20a *g, u32 niso_intr)
|
||||
{
|
||||
|
||||
@@ -77,6 +77,7 @@ void gv11b_fb_handle_nonreplay_fault_overflow(struct gk20a *g,
|
||||
u32 fault_status);
|
||||
void gv11b_fb_handle_replay_fault_overflow(struct gk20a *g,
|
||||
u32 fault_status);
|
||||
void gv11b_fb_handle_replayable_mmu_fault(struct gk20a *g);
|
||||
void gv11b_handle_l2tlb_ecc_isr(struct gk20a *g, u32 ecc_status);
|
||||
void gv11b_handle_hubtlb_ecc_isr(struct gk20a *g, u32 ecc_status);
|
||||
void gv11b_handle_fillunit_ecc_isr(struct gk20a *g, u32 ecc_status);
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#include "gv11b/subctx_gv11b.h"
|
||||
#include "gv11b/gv11b.h"
|
||||
#include "gv11b/gr_pri_gv11b.h"
|
||||
#include "gv11b/fb_gv11b.h"
|
||||
|
||||
#include <nvgpu/hw/gv11b/hw_gr_gv11b.h>
|
||||
#include <nvgpu/hw/gv11b/hw_fifo_gv11b.h>
|
||||
@@ -3735,15 +3736,19 @@ int gv11b_gr_wait_for_sm_lock_down(struct gk20a *g,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* if an mmu fault is pending and mmu debug mode is not
|
||||
* enabled, the sm will never lock down.
|
||||
*/
|
||||
if (!mmu_debug_mode_enabled &&
|
||||
(g->ops.mm.mmu_fault_pending(g))) {
|
||||
nvgpu_err(g,
|
||||
"GPC%d TPC%d: mmu fault pending,"
|
||||
" SM%d will never lock down!", gpc, tpc, sm);
|
||||
return -EFAULT;
|
||||
if (mmu_debug_mode_enabled) {
|
||||
gv11b_fb_handle_replayable_mmu_fault(g);
|
||||
} else {
|
||||
/* if an mmu fault is pending and mmu debug mode is not
|
||||
* enabled, the sm will never lock down.
|
||||
*/
|
||||
if (g->ops.mm.mmu_fault_pending(g)) {
|
||||
nvgpu_err(g,
|
||||
"GPC%d TPC%d: mmu fault pending,"
|
||||
" SM%d will never lock down!",
|
||||
gpc, tpc, sm);
|
||||
return -EFAULT;
|
||||
}
|
||||
}
|
||||
|
||||
nvgpu_usleep_range(delay, delay * 2);
|
||||
|
||||
Reference in New Issue
Block a user