diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index e48676990235..a556a8b84027 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -251,3 +251,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_aes_encrypt); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_aes_decrypt); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_modify_thermal_request_freq); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_modify_thermal_target_freq); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rproc_recovery_set); diff --git a/drivers/remoteproc/remoteproc_sysfs.c b/drivers/remoteproc/remoteproc_sysfs.c index ea8b89f97d7b..1c7c34efe247 100644 --- a/drivers/remoteproc/remoteproc_sysfs.c +++ b/drivers/remoteproc/remoteproc_sysfs.c @@ -5,6 +5,7 @@ #include #include +#include #include "remoteproc_internal.h" @@ -51,9 +52,11 @@ static ssize_t recovery_store(struct device *dev, if (sysfs_streq(buf, "enabled")) { /* change the flag and begin the recovery process if needed */ rproc->recovery_disabled = false; + trace_android_vh_rproc_recovery_set(rproc); rproc_trigger_recovery(rproc); } else if (sysfs_streq(buf, "disabled")) { rproc->recovery_disabled = true; + trace_android_vh_rproc_recovery_set(rproc); } else if (sysfs_streq(buf, "recover")) { /* begin the recovery process without changing the flag */ rproc_trigger_recovery(rproc); diff --git a/include/trace/hooks/remoteproc.h b/include/trace/hooks/remoteproc.h index dfac7b9e52db..722e2917003c 100644 --- a/include/trace/hooks/remoteproc.h +++ b/include/trace/hooks/remoteproc.h @@ -12,10 +12,18 @@ struct rproc; #include #include +struct rproc; + +/* When recovery succeeds */ DECLARE_HOOK(android_vh_rproc_recovery, TP_PROTO(struct rproc *rproc), TP_ARGS(rproc)); -#endif /* _TRACE_HOOK_GIC_H */ +/* When recovery mode is enabled or disabled by sysfs */ +DECLARE_HOOK(android_vh_rproc_recovery_set, + TP_PROTO(struct rproc *rproc), + TP_ARGS(rproc)); + +#endif /* _TRACE_HOOK_RPROC_H */ /* This part must be outside protection */ #include