mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
expose ssr_reason to ss_ramdump
expose ssr_reason to ss_ramdump so that bug2go can show it in their record. Change-Id: Id8fdaa1b5aa279f6a70a42c278c324007b27e758 Reviewed-on: https://gerrit.mot.com/1786969 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Yifu Lin <linyf@lenovo.com> Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
076032ea2e
commit
c620ee51e4
1 changed files with 7 additions and 3 deletions
|
|
@ -46,6 +46,10 @@
|
|||
#define desc_to_data(d) container_of(d, struct pil_tz_data, desc)
|
||||
#define subsys_to_data(d) container_of(d, struct pil_tz_data, subsys_desc)
|
||||
|
||||
static char pil_ssr_reason[MAX_SSR_REASON_LEN];
|
||||
static char *ssr_reason = pil_ssr_reason;
|
||||
module_param(ssr_reason, charp, S_IRUGO);
|
||||
|
||||
/**
|
||||
* struct reg_info - regulator info
|
||||
* @reg: regulator handle
|
||||
|
|
@ -761,7 +765,7 @@ static struct pil_reset_ops pil_ops_trusted = {
|
|||
static void log_failure_reason(const struct pil_tz_data *d)
|
||||
{
|
||||
size_t size;
|
||||
char *smem_reason, reason[MAX_SSR_REASON_LEN];
|
||||
char *smem_reason;
|
||||
const char *name = d->subsys_desc.name;
|
||||
|
||||
if (d->smem_id == -1)
|
||||
|
|
@ -778,8 +782,8 @@ static void log_failure_reason(const struct pil_tz_data *d)
|
|||
return;
|
||||
}
|
||||
|
||||
strlcpy(reason, smem_reason, min(size, (size_t)MAX_SSR_REASON_LEN));
|
||||
pr_err("%s subsystem failure reason: %s.\n", name, reason);
|
||||
strlcpy(pil_ssr_reason, smem_reason, min((size_t)size, (size_t)sizeof(pil_ssr_reason)));
|
||||
pr_err("%s subsystem failure reason: %s.\n", name, pil_ssr_reason);
|
||||
}
|
||||
|
||||
static int subsys_shutdown(const struct subsys_desc *subsys, bool force_stop)
|
||||
|
|
|
|||
Loading…
Reference in a new issue