ANDROID: rproc: Add vendor hook when setting recovery mode
Add vendor hook when setting recovery mode to notify coprocessor when mode is changed. Bug: 205534894 Signed-off-by: Elliot Berman <quic_eberman@quicinc.com> Change-Id: Ie41170deb0426a7bcfeed8a51cc4e8e1a427592a
This commit is contained in:
@@ -364,6 +364,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_force_compatible_post);
|
|||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_print_transaction_info);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_print_transaction_info);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_setscheduler_uclamp);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_setscheduler_uclamp);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rproc_recovery);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rproc_recovery);
|
||||||
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rproc_recovery_set);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ptype_head);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ptype_head);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_kfree_skb);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_kfree_skb);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_check_mmap_file);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_check_mmap_file);
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#include <linux/remoteproc.h>
|
#include <linux/remoteproc.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
|
#include <trace/hooks/remoteproc.h>
|
||||||
|
|
||||||
#include "remoteproc_internal.h"
|
#include "remoteproc_internal.h"
|
||||||
|
|
||||||
@@ -51,9 +52,11 @@ static ssize_t recovery_store(struct device *dev,
|
|||||||
if (sysfs_streq(buf, "enabled")) {
|
if (sysfs_streq(buf, "enabled")) {
|
||||||
/* change the flag and begin the recovery process if needed */
|
/* change the flag and begin the recovery process if needed */
|
||||||
rproc->recovery_disabled = false;
|
rproc->recovery_disabled = false;
|
||||||
|
trace_android_vh_rproc_recovery_set(rproc);
|
||||||
rproc_trigger_recovery(rproc);
|
rproc_trigger_recovery(rproc);
|
||||||
} else if (sysfs_streq(buf, "disabled")) {
|
} else if (sysfs_streq(buf, "disabled")) {
|
||||||
rproc->recovery_disabled = true;
|
rproc->recovery_disabled = true;
|
||||||
|
trace_android_vh_rproc_recovery_set(rproc);
|
||||||
} else if (sysfs_streq(buf, "recover")) {
|
} else if (sysfs_streq(buf, "recover")) {
|
||||||
/* begin the recovery process without changing the flag */
|
/* begin the recovery process without changing the flag */
|
||||||
rproc_trigger_recovery(rproc);
|
rproc_trigger_recovery(rproc);
|
||||||
|
@@ -12,10 +12,16 @@
|
|||||||
|
|
||||||
struct rproc;
|
struct rproc;
|
||||||
|
|
||||||
|
/* When recovery succeeds */
|
||||||
DECLARE_HOOK(android_vh_rproc_recovery,
|
DECLARE_HOOK(android_vh_rproc_recovery,
|
||||||
TP_PROTO(struct rproc *rproc),
|
TP_PROTO(struct rproc *rproc),
|
||||||
TP_ARGS(rproc));
|
TP_ARGS(rproc));
|
||||||
|
|
||||||
|
/* 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 */
|
#endif /* _TRACE_HOOK_RPROC_H */
|
||||||
/* This part must be outside protection */
|
/* This part must be outside protection */
|
||||||
#include <trace/define_trace.h>
|
#include <trace/define_trace.h>
|
||||||
|
Reference in New Issue
Block a user