mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: gv11b: replay invalid pte faults only
Try to fix invalid pte type repalayable faults only. All other replayable faults will be cancelled so that next mmu fault for same fault address will be triggered as non-replayable fault and ch/tsg teardown will take place. Bug 1958308 Change-Id: I63b90ce7c639ee183f87db3e771f253fd04c3567 Signed-off-by: Seema Khowala <seemaj@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1566576 GVS: Gerrit_Virtual_Submit Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
d69e51813a
commit
4f24e212cb
@@ -1434,13 +1434,19 @@ static void gv11b_fb_handle_mmu_fault_common(struct gk20a *g,
|
||||
g->ops.fifo.teardown_ch_tsg(g, act_eng_bitmask,
|
||||
id, id_type, RC_TYPE_MMU_FAULT, mmfault);
|
||||
} else {
|
||||
err = gv11b_fb_fix_page_fault(g, mmfault);
|
||||
if (err) {
|
||||
if (mmfault->fault_type == gmmu_fault_type_pte_v()) {
|
||||
nvgpu_log(g, gpu_dbg_intr, "invalid pte! try to fix");
|
||||
err = gv11b_fb_fix_page_fault(g, mmfault);
|
||||
if (err)
|
||||
*invalidate_replay_val |=
|
||||
fb_mmu_invalidate_replay_cancel_global_f();
|
||||
else
|
||||
*invalidate_replay_val |=
|
||||
fb_mmu_invalidate_replay_start_ack_all_f();
|
||||
} else {
|
||||
/* cancel faults other than invalid pte */
|
||||
*invalidate_replay_val |=
|
||||
fb_mmu_invalidate_replay_cancel_global_f();
|
||||
} else {
|
||||
*invalidate_replay_val |=
|
||||
fb_mmu_invalidate_replay_start_ack_all_f();
|
||||
}
|
||||
/* refch in mmfault is assigned at the time of copying
|
||||
* fault info from snap reg or bar2 fault buf
|
||||
@@ -1960,6 +1966,17 @@ static int gv11b_fb_fix_page_fault(struct gk20a *g,
|
||||
nvgpu_log(g, gpu_dbg_intr | gpu_dbg_pte,
|
||||
"pte: %#08x %#08x", pte[1], pte[0]);
|
||||
|
||||
if (pte[0] == 0x0 && pte[1] == 0x0) {
|
||||
nvgpu_log(g, gpu_dbg_intr | gpu_dbg_pte,
|
||||
"pte all zeros, do not set valid");
|
||||
return -1;
|
||||
}
|
||||
if (pte[0] & gmmu_new_pte_valid_true_f()) {
|
||||
nvgpu_log(g, gpu_dbg_intr | gpu_dbg_pte,
|
||||
"pte valid already set");
|
||||
return -1;
|
||||
}
|
||||
|
||||
pte[0] |= gmmu_new_pte_valid_true_f();
|
||||
if (pte[0] & gmmu_new_pte_read_only_true_f())
|
||||
pte[0] &= ~(gmmu_new_pte_read_only_true_f());
|
||||
|
||||
@@ -1272,6 +1272,10 @@ static inline u32 gmmu_fault_type_unbound_inst_block_v(void)
|
||||
{
|
||||
return 0x00000004U;
|
||||
}
|
||||
static inline u32 gmmu_fault_type_pte_v(void)
|
||||
{
|
||||
return 0x00000002U;
|
||||
}
|
||||
static inline u32 gmmu_fault_mmu_eng_id_bar2_v(void)
|
||||
{
|
||||
return 0x00000005U;
|
||||
|
||||
Reference in New Issue
Block a user