From 2e37abb89a2ef13c524b0728bb9893f996a10b6b Mon Sep 17 00:00:00 2001 From: Fernando Guzman Lugo Date: Tue, 18 Sep 2012 12:26:35 +0300 Subject: remoteproc: create a 'recovery' debugfs entry Add a 'recovery' debugfs entry to dynamically disable/enable recovery at runtime. This is useful when one is trying to debug an rproc crash; without it, a recovery will immediately take place, making it harder to debug the crash. Contributions from Subramaniam Chanderashekarapuram. Examples: - disabling recovery: $ echo disabled > /remoteproc/remoteproc0/recovery - in case you want to recover a crash, but keep recovery disabled (useful in debugging sessions when you expect additional crashes you want to debug): $ echo recover > /remoteproc/remoteproc0/recovery - enabling recovery: $ echo enabled > /remoteproc/remoteproc0/recovery Signed-off-by: Fernando Guzman Lugo [ohad: some white space, commentary and commit log changes] Signed-off-by: Ohad Ben-Cohen --- drivers/remoteproc/remoteproc_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/remoteproc/remoteproc_core.c') diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 5000d7589cf..29fc8236cac 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -965,7 +965,8 @@ static void rproc_crash_handler_work(struct work_struct *work) mutex_unlock(&rproc->lock); - rproc_trigger_recovery(rproc); + if (!rproc->recovery_disabled) + rproc_trigger_recovery(rproc); } /** -- cgit v1.2.3