diff options
author | Fernando Guzman Lugo <fernando.lugo@ti.com> | 2012-09-18 12:26:35 +0300 |
---|---|---|
committer | Ohad Ben-Cohen <ohad@wizery.com> | 2012-09-18 12:53:41 +0300 |
commit | 2e37abb89a2ef13c524b0728bb9893f996a10b6b (patch) | |
tree | 11e760251317566b19cd9053608afa67cab88576 /drivers/remoteproc/remoteproc_core.c | |
parent | 70b85ef83ce3523f709b622d2c4cb31778686338 (diff) | |
download | kernel_goldelico_gta04-2e37abb89a2ef13c524b0728bb9893f996a10b6b.zip kernel_goldelico_gta04-2e37abb89a2ef13c524b0728bb9893f996a10b6b.tar.gz kernel_goldelico_gta04-2e37abb89a2ef13c524b0728bb9893f996a10b6b.tar.bz2 |
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 > <debugfs>/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 > <debugfs>/remoteproc/remoteproc0/recovery
- enabling recovery:
$ echo enabled > <debugfs>/remoteproc/remoteproc0/recovery
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
[ohad: some white space, commentary and commit log changes]
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Diffstat (limited to 'drivers/remoteproc/remoteproc_core.c')
-rw-r--r-- | drivers/remoteproc/remoteproc_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 5000d75..29fc823 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); } /** |