diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-10 15:09:27 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-10 15:09:27 -0400 |
| commit | 92589cbdda677a84ca5e485e1083c7d3bdcfc7b9 (patch) | |
| tree | 3ba481707efe11a28d2cb27f8bacfde4224ad6cd /include/linux | |
| parent | 9ab89c407d904c284558bbcd285eb3baef9d8c07 (diff) | |
| parent | 730b2ad8f72898029160a6832141ba954122a0c8 (diff) | |
Merge tag 'rproc-v4.17' of git://github.com/andersson/remoteproc
Pull remoteproc updates from Bjorn Andersson:
- add support for generating coredumps for remoteprocs using
devcoredump
- add the Qualcomm sysmon driver for intra-remoteproc crash handling
- a number of fixes in Qualcomm and IMX drivers
* tag 'rproc-v4.17' of git://github.com/andersson/remoteproc:
remoteproc: fix null pointer dereference on glink only platforms
soc: qcom: qmi: add CONFIG_NET dependency
remoteproc: imx_rproc: Slightly simplify code in 'imx_rproc_probe()'
remoteproc: imx_rproc: Re-use existing error handling path in 'imx_rproc_probe()'
remoteproc: imx_rproc: Fix an error handling path in 'imx_rproc_probe()'
samples: Introduce Qualcomm QMI sample client
remoteproc: qcom: Introduce sysmon
remoteproc: Pass type of shutdown to subdev remove
remoteproc: qcom: Register segments for core dump
soc: qcom: mdt-loader: Return relocation base
remoteproc: Rename "load_rsc_table" to "parse_fw"
remoteproc: Add remote processor coredump support
remoteproc: Remove null character write of shared mem
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/remoteproc.h | 27 | ||||
| -rw-r--r-- | include/linux/soc/qcom/mdt_loader.h | 3 |
2 files changed, 25 insertions, 5 deletions
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index 728d421fffe9..d09a9c7af109 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h | |||
| @@ -344,7 +344,7 @@ struct rproc_ops { | |||
| 344 | int (*stop)(struct rproc *rproc); | 344 | int (*stop)(struct rproc *rproc); |
| 345 | void (*kick)(struct rproc *rproc, int vqid); | 345 | void (*kick)(struct rproc *rproc, int vqid); |
| 346 | void * (*da_to_va)(struct rproc *rproc, u64 da, int len); | 346 | void * (*da_to_va)(struct rproc *rproc, u64 da, int len); |
| 347 | int (*load_rsc_table)(struct rproc *rproc, const struct firmware *fw); | 347 | int (*parse_fw)(struct rproc *rproc, const struct firmware *fw); |
| 348 | struct resource_table *(*find_loaded_rsc_table)( | 348 | struct resource_table *(*find_loaded_rsc_table)( |
| 349 | struct rproc *rproc, const struct firmware *fw); | 349 | struct rproc *rproc, const struct firmware *fw); |
| 350 | int (*load)(struct rproc *rproc, const struct firmware *fw); | 350 | int (*load)(struct rproc *rproc, const struct firmware *fw); |
| @@ -395,6 +395,21 @@ enum rproc_crash_type { | |||
| 395 | }; | 395 | }; |
| 396 | 396 | ||
| 397 | /** | 397 | /** |
| 398 | * struct rproc_dump_segment - segment info from ELF header | ||
| 399 | * @node: list node related to the rproc segment list | ||
| 400 | * @da: device address of the segment | ||
| 401 | * @size: size of the segment | ||
| 402 | */ | ||
| 403 | struct rproc_dump_segment { | ||
| 404 | struct list_head node; | ||
| 405 | |||
| 406 | dma_addr_t da; | ||
| 407 | size_t size; | ||
| 408 | |||
| 409 | loff_t offset; | ||
| 410 | }; | ||
| 411 | |||
| 412 | /** | ||
| 398 | * struct rproc - represents a physical remote processor device | 413 | * struct rproc - represents a physical remote processor device |
| 399 | * @node: list node of this rproc object | 414 | * @node: list node of this rproc object |
| 400 | * @domain: iommu domain | 415 | * @domain: iommu domain |
| @@ -424,6 +439,7 @@ enum rproc_crash_type { | |||
| 424 | * @cached_table: copy of the resource table | 439 | * @cached_table: copy of the resource table |
| 425 | * @table_sz: size of @cached_table | 440 | * @table_sz: size of @cached_table |
| 426 | * @has_iommu: flag to indicate if remote processor is behind an MMU | 441 | * @has_iommu: flag to indicate if remote processor is behind an MMU |
| 442 | * @dump_segments: list of segments in the firmware | ||
| 427 | */ | 443 | */ |
| 428 | struct rproc { | 444 | struct rproc { |
| 429 | struct list_head node; | 445 | struct list_head node; |
| @@ -455,19 +471,21 @@ struct rproc { | |||
| 455 | size_t table_sz; | 471 | size_t table_sz; |
| 456 | bool has_iommu; | 472 | bool has_iommu; |
| 457 | bool auto_boot; | 473 | bool auto_boot; |
| 474 | struct list_head dump_segments; | ||
| 458 | }; | 475 | }; |
| 459 | 476 | ||
| 460 | /** | 477 | /** |
| 461 | * struct rproc_subdev - subdevice tied to a remoteproc | 478 | * struct rproc_subdev - subdevice tied to a remoteproc |
| 462 | * @node: list node related to the rproc subdevs list | 479 | * @node: list node related to the rproc subdevs list |
| 463 | * @probe: probe function, called as the rproc is started | 480 | * @probe: probe function, called as the rproc is started |
| 464 | * @remove: remove function, called as the rproc is stopped | 481 | * @remove: remove function, called as the rproc is being stopped, the @crashed |
| 482 | * parameter indicates if this originates from the a recovery | ||
| 465 | */ | 483 | */ |
| 466 | struct rproc_subdev { | 484 | struct rproc_subdev { |
| 467 | struct list_head node; | 485 | struct list_head node; |
| 468 | 486 | ||
| 469 | int (*probe)(struct rproc_subdev *subdev); | 487 | int (*probe)(struct rproc_subdev *subdev); |
| 470 | void (*remove)(struct rproc_subdev *subdev); | 488 | void (*remove)(struct rproc_subdev *subdev, bool crashed); |
| 471 | }; | 489 | }; |
| 472 | 490 | ||
| 473 | /* we currently support only two vrings per rvdev */ | 491 | /* we currently support only two vrings per rvdev */ |
| @@ -534,6 +552,7 @@ void rproc_free(struct rproc *rproc); | |||
| 534 | int rproc_boot(struct rproc *rproc); | 552 | int rproc_boot(struct rproc *rproc); |
| 535 | void rproc_shutdown(struct rproc *rproc); | 553 | void rproc_shutdown(struct rproc *rproc); |
| 536 | void rproc_report_crash(struct rproc *rproc, enum rproc_crash_type type); | 554 | void rproc_report_crash(struct rproc *rproc, enum rproc_crash_type type); |
| 555 | int rproc_coredump_add_segment(struct rproc *rproc, dma_addr_t da, size_t size); | ||
| 537 | 556 | ||
| 538 | static inline struct rproc_vdev *vdev_to_rvdev(struct virtio_device *vdev) | 557 | static inline struct rproc_vdev *vdev_to_rvdev(struct virtio_device *vdev) |
| 539 | { | 558 | { |
| @@ -550,7 +569,7 @@ static inline struct rproc *vdev_to_rproc(struct virtio_device *vdev) | |||
| 550 | void rproc_add_subdev(struct rproc *rproc, | 569 | void rproc_add_subdev(struct rproc *rproc, |
| 551 | struct rproc_subdev *subdev, | 570 | struct rproc_subdev *subdev, |
| 552 | int (*probe)(struct rproc_subdev *subdev), | 571 | int (*probe)(struct rproc_subdev *subdev), |
| 553 | void (*remove)(struct rproc_subdev *subdev)); | 572 | void (*remove)(struct rproc_subdev *subdev, bool graceful)); |
| 554 | 573 | ||
| 555 | void rproc_remove_subdev(struct rproc *rproc, struct rproc_subdev *subdev); | 574 | void rproc_remove_subdev(struct rproc *rproc, struct rproc_subdev *subdev); |
| 556 | 575 | ||
diff --git a/include/linux/soc/qcom/mdt_loader.h b/include/linux/soc/qcom/mdt_loader.h index bd8e0864b059..5b98bbdabc25 100644 --- a/include/linux/soc/qcom/mdt_loader.h +++ b/include/linux/soc/qcom/mdt_loader.h | |||
| @@ -14,6 +14,7 @@ struct firmware; | |||
| 14 | ssize_t qcom_mdt_get_size(const struct firmware *fw); | 14 | ssize_t qcom_mdt_get_size(const struct firmware *fw); |
| 15 | int qcom_mdt_load(struct device *dev, const struct firmware *fw, | 15 | int qcom_mdt_load(struct device *dev, const struct firmware *fw, |
| 16 | const char *fw_name, int pas_id, void *mem_region, | 16 | const char *fw_name, int pas_id, void *mem_region, |
| 17 | phys_addr_t mem_phys, size_t mem_size); | 17 | phys_addr_t mem_phys, size_t mem_size, |
| 18 | phys_addr_t *reloc_base); | ||
| 18 | 19 | ||
| 19 | #endif | 20 | #endif |
