mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
soc: qcom: Add trace event for ssr restart level change
Add trace event to notify users of SSR restart level change. Change-Id: I2b4fcf2bcfcf7a3d90f8027aba1affe990692d42 Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
This commit is contained in:
parent
1da9486979
commit
3c839d89c8
2 changed files with 24 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2011-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2011-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "subsys-restart: %s(): " fmt, __func__
|
||||
|
|
@ -260,6 +260,7 @@ static ssize_t restart_level_store(struct device *dev,
|
|||
for (i = 0; i < ARRAY_SIZE(restart_levels); i++)
|
||||
if (!strncasecmp(buf, restart_levels[i], count)) {
|
||||
subsys->restart_level = i;
|
||||
trace_pil_restart_level(i, subsys->desc->fw_name);
|
||||
return orig_count;
|
||||
}
|
||||
return -EPERM;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2019, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2019,2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#undef TRACE_SYSTEM
|
||||
|
|
@ -37,6 +37,27 @@ TRACE_EVENT(pil_notif,
|
|||
__get_str(fw_name))
|
||||
);
|
||||
|
||||
TRACE_EVENT(pil_restart_level,
|
||||
|
||||
TP_PROTO(int restart_level, const char *fw_name),
|
||||
|
||||
TP_ARGS(restart_level, fw_name),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(int, restart_level)
|
||||
__string(fw_name, fw_name)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->restart_level = restart_level;
|
||||
__assign_str(fw_name, fw_name);
|
||||
),
|
||||
|
||||
TP_printk("restart_level=%d fw=%s",
|
||||
__entry->restart_level,
|
||||
__get_str(fw_name))
|
||||
);
|
||||
|
||||
#endif
|
||||
#define TRACE_INCLUDE_FILE trace_msm_ssr_event
|
||||
#include <trace/define_trace.h>
|
||||
|
|
|
|||
Loading…
Reference in a new issue