mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
mmi_annotate: add unpersist annotate memory region to minidump
For the minidump region of mmi_annotate, should record volatile memory instead of persist memory when platform doesn't support persist memory. Change-Id: I94afe0b8ff5eda3686e2957f00747a4cb4582a89 Reviewed-on: https://gerrit.mot.com/2160648 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Guobin Zhang <zhanggb@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
60c5552188
commit
bc00b7fe1a
1 changed files with 9 additions and 3 deletions
|
|
@ -262,9 +262,15 @@ static int mmi_annotate_probe(struct platform_device *pdev)
|
|||
#if IS_ENABLED(CONFIG_QCOM_MINIDUMP)
|
||||
/*Register annotate to minidump */
|
||||
strlcpy(md_entry.name, "ANNOTATE", sizeof(md_entry.name));
|
||||
md_entry.virt_addr = (uintptr_t)phys_to_virt(pdata->mem_address);
|
||||
md_entry.phys_addr = pdata->mem_address;
|
||||
md_entry.size = pdata->mem_size;
|
||||
if (!persist_unsupported) {
|
||||
md_entry.virt_addr = (uintptr_t)phys_to_virt(pdata->mem_address);
|
||||
md_entry.phys_addr = pdata->mem_address;
|
||||
md_entry.size = pdata->mem_size;
|
||||
} else {
|
||||
md_entry.virt_addr = (uintptr_t)mem_data.contents;
|
||||
md_entry.phys_addr = virt_to_phys((void*)mem_data.contents);
|
||||
md_entry.size = mem_data.size;
|
||||
}
|
||||
if (msm_minidump_add_region(&md_entry) < 0)
|
||||
pr_err("Failed to add annotate in Minidump\n");
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue