aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/remoteproc.h
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@linaro.org>2020-03-23 22:29:02 -0700
committerBjorn Andersson <bjorn.andersson@linaro.org>2020-03-25 22:29:45 -0700
commitdc5192c449368eed3385f4405670aa3ed21d6270 (patch)
tree9875fe39fdbebb01dd5649cf2dbfee809ccead83 /include/linux/remoteproc.h
parentremoteproc: Traverse rproc_list under RCU read lock (diff)
downloadlinux-dev-dc5192c449368eed3385f4405670aa3ed21d6270.tar.xz
linux-dev-dc5192c449368eed3385f4405670aa3ed21d6270.zip
remoteproc: Introduce "panic" callback in ops
Introduce generic support for handling kernel panics in remoteproc drivers, in order to allow operations needed for aiding in post mortem system debugging, such as flushing caches etc. The function can return a number of milliseconds needed by the remote to "settle" and the core will wait the longest returned duration before returning from the panic handler. Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org> Link: https://lore.kernel.org/r/20200324052904.738594-3-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'include/linux/remoteproc.h')
-rw-r--r--include/linux/remoteproc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h
index ed127b2d35ca..9c07d7958c53 100644
--- a/include/linux/remoteproc.h
+++ b/include/linux/remoteproc.h
@@ -369,6 +369,8 @@ enum rsc_handling_status {
* expects to find it
* @sanity_check: sanity check the fw image
* @get_boot_addr: get boot address to entry point specified in firmware
+ * @panic: optional callback to react to system panic, core will delay
+ * panic at least the returned number of milliseconds
*/
struct rproc_ops {
int (*start)(struct rproc *rproc);
@@ -383,6 +385,7 @@ struct rproc_ops {
int (*load)(struct rproc *rproc, const struct firmware *fw);
int (*sanity_check)(struct rproc *rproc, const struct firmware *fw);
u64 (*get_boot_addr)(struct rproc *rproc, const struct firmware *fw);
+ unsigned long (*panic)(struct rproc *rproc);
};
/**