aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/remoteproc.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h
index 131b53957b9f..a46ed2723803 100644
--- a/include/linux/remoteproc.h
+++ b/include/linux/remoteproc.h
@@ -361,6 +361,19 @@ enum rproc_state {
361}; 361};
362 362
363/** 363/**
364 * enum rproc_crash_type - remote processor crash types
365 * @RPROC_MMUFAULT: iommu fault
366 *
367 * Each element of the enum is used as an array index. So that, the value of
368 * the elements should be always something sane.
369 *
370 * Feel free to add more types when needed.
371 */
372enum rproc_crash_type {
373 RPROC_MMUFAULT,
374};
375
376/**
364 * struct rproc - represents a physical remote processor device 377 * struct rproc - represents a physical remote processor device
365 * @node: klist node of this rproc object 378 * @node: klist node of this rproc object
366 * @domain: iommu domain 379 * @domain: iommu domain
@@ -383,6 +396,8 @@ enum rproc_state {
383 * @rvdevs: list of remote virtio devices 396 * @rvdevs: list of remote virtio devices
384 * @notifyids: idr for dynamically assigning rproc-wide unique notify ids 397 * @notifyids: idr for dynamically assigning rproc-wide unique notify ids
385 * @index: index of this rproc device 398 * @index: index of this rproc device
399 * @crash_handler: workqueue for handling a crash
400 * @crash_cnt: crash counter
386 */ 401 */
387struct rproc { 402struct rproc {
388 struct klist_node node; 403 struct klist_node node;
@@ -406,6 +421,8 @@ struct rproc {
406 struct list_head rvdevs; 421 struct list_head rvdevs;
407 struct idr notifyids; 422 struct idr notifyids;
408 int index; 423 int index;
424 struct work_struct crash_handler;
425 unsigned crash_cnt;
409}; 426};
410 427
411/* we currently support only two vrings per rvdev */ 428/* we currently support only two vrings per rvdev */
@@ -460,6 +477,7 @@ int rproc_del(struct rproc *rproc);
460 477
461int rproc_boot(struct rproc *rproc); 478int rproc_boot(struct rproc *rproc);
462void rproc_shutdown(struct rproc *rproc); 479void rproc_shutdown(struct rproc *rproc);
480void rproc_report_crash(struct rproc *rproc, enum rproc_crash_type type);
463 481
464static inline struct rproc_vdev *vdev_to_rvdev(struct virtio_device *vdev) 482static inline struct rproc_vdev *vdev_to_rvdev(struct virtio_device *vdev)
465{ 483{