diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-10-30 03:20:56 -0400 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-10-30 03:20:56 -0400 |
| commit | 53279f36dccffc26ff536003fd6bb97cc21c3b82 (patch) | |
| tree | 9d16e497c0e4158c7c054c479bd0e9ff0388d7bb /include/linux/remoteproc.h | |
| parent | a6e8c0a25377e27958b11b20e1927885ae7c9857 (diff) | |
| parent | 8f0d8163b50e01f398b14bcd4dc039ac5ab18d64 (diff) | |
Merge tag 'v3.7-rc3' into next to sync up with recent USB and MFD changes
Diffstat (limited to 'include/linux/remoteproc.h')
| -rw-r--r-- | include/linux/remoteproc.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index 131b53957b9f..faf33324c78f 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 | */ | ||
| 372 | enum 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,11 @@ 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 | ||
| 401 | * @crash_comp: completion used to sync crash handler and the rproc reload | ||
| 402 | * @recovery_disabled: flag that state if recovery was disabled | ||
| 403 | * @max_notifyid: largest allocated notify id. | ||
| 386 | */ | 404 | */ |
| 387 | struct rproc { | 405 | struct rproc { |
| 388 | struct klist_node node; | 406 | struct klist_node node; |
| @@ -406,6 +424,11 @@ struct rproc { | |||
| 406 | struct list_head rvdevs; | 424 | struct list_head rvdevs; |
| 407 | struct idr notifyids; | 425 | struct idr notifyids; |
| 408 | int index; | 426 | int index; |
| 427 | struct work_struct crash_handler; | ||
| 428 | unsigned crash_cnt; | ||
| 429 | struct completion crash_comp; | ||
| 430 | bool recovery_disabled; | ||
| 431 | int max_notifyid; | ||
| 409 | }; | 432 | }; |
| 410 | 433 | ||
| 411 | /* we currently support only two vrings per rvdev */ | 434 | /* we currently support only two vrings per rvdev */ |
| @@ -460,6 +483,7 @@ int rproc_del(struct rproc *rproc); | |||
| 460 | 483 | ||
| 461 | int rproc_boot(struct rproc *rproc); | 484 | int rproc_boot(struct rproc *rproc); |
| 462 | void rproc_shutdown(struct rproc *rproc); | 485 | void rproc_shutdown(struct rproc *rproc); |
| 486 | void rproc_report_crash(struct rproc *rproc, enum rproc_crash_type type); | ||
| 463 | 487 | ||
| 464 | static inline struct rproc_vdev *vdev_to_rvdev(struct virtio_device *vdev) | 488 | static inline struct rproc_vdev *vdev_to_rvdev(struct virtio_device *vdev) |
| 465 | { | 489 | { |
