msm: eva: Add SSR counter
Support configurable number of SSR tolerance before calling BUG_ON in SMMU fault scenario. Change-Id: I19dabbeaa1cf5be86f42a6ace62ef5da12743e79 Signed-off-by: George Shen <sqiao@codeaurora.org>
This commit is contained in:
@@ -670,7 +670,7 @@ static void handle_sys_error(enum hal_command_response cmd, void *data)
|
||||
}
|
||||
|
||||
if (!core->trigger_ssr)
|
||||
msm_cvp_print_inst_bufs(inst);
|
||||
msm_cvp_print_inst_bufs(inst, false);
|
||||
}
|
||||
|
||||
/* handle the hw error before core released to get full debug info */
|
||||
@@ -1036,7 +1036,6 @@ static int msm_comm_init_core(struct msm_cvp_inst *inst)
|
||||
goto fail_core_init;
|
||||
}
|
||||
core->state = CVP_CORE_INIT;
|
||||
core->smmu_fault_handled = false;
|
||||
core->trigger_ssr = false;
|
||||
|
||||
core_already_inited:
|
||||
@@ -1304,6 +1303,7 @@ int msm_cvp_comm_try_state(struct msm_cvp_inst *inst, int state)
|
||||
int msm_cvp_noc_error_info(struct msm_cvp_core *core)
|
||||
{
|
||||
struct cvp_hfi_device *hdev;
|
||||
static u32 last_fault_count = 0;
|
||||
|
||||
if (!core || !core->device) {
|
||||
dprintk(CVP_WARN, "%s: Invalid parameters: %pK\n",
|
||||
@@ -1311,13 +1311,20 @@ int msm_cvp_noc_error_info(struct msm_cvp_core *core)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!core->smmu_fault_handled)
|
||||
if (!core->smmu_fault_count ||
|
||||
core->smmu_fault_count == last_fault_count)
|
||||
return 0;
|
||||
|
||||
last_fault_count = core->smmu_fault_count;
|
||||
core->ssr_count++;
|
||||
dprintk(CVP_ERR, "cvp ssr count %d %d\n", core->ssr_count,
|
||||
core->resources.max_ssr_allowed);
|
||||
hdev = core->device;
|
||||
call_hfi_op(hdev, noc_error_info, hdev->hfi_device_data);
|
||||
|
||||
BUG_ON(!core->resources.non_fatal_pagefaults);
|
||||
if (core->ssr_count >= core->resources.max_ssr_allowed)
|
||||
BUG_ON(!core->resources.non_fatal_pagefaults);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user