remoteproc updates for v4.17
This adds support for generating coredumps for remoteprocs using devcoredump, adds the Qualcomm sysmon driver for intra-remoteproc crash handling and a number of fixes in Qualcomm and IMX drivers. -----BEGIN PGP SIGNATURE----- iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAlrL5dgbHGJqb3JuLmFu ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3FufUP/ifQ+QbDzYzBI4CHfbef hls8bplN9GlW4acJuhVRe8ikGz6vHZdyH88KJJX+IHekDXFqk10rWEgcyfV0h5mU qOrhiW7hjfm2Mhs0MvNg9rKxbFrD5wAeJBJn8ukTB4z4jc9iFPazVu37V3ul/wVR yMM4zI6kA54UwsLunqLEapb1thgLO4P99tvA+vdR8ekz/j0AVHB7HiHVLY1JX5Gu D679icQSWOSsSQaRR7G0E97ZKZF6XaM6+aJV3eZol1HQw8k3I/Vbudi2wIKj0Ia8 jLO5JyCpgeSAAjPCZLrB5XyUXl/vU7PSPKTPyOnv2lK1wQgKsmHX80HfeAt1ISNn 4nY/Oy651/rjBN3FR9HQvQoqCDF08GG5YRDmUZCg0kS/OStrbJT4eCm+hklvanmK O98LEWm5+FLqk+9Wau1DXGa0raXon2REIJxQSDnBUODZSqTQBS1iQmdtdYtrZxRp 17LtCABCSBMbAI8VE6eb/5jj/z07aI0pBwKEYEWOOG2xsF6q1GGZAXRxnmMUOWAv bwSgiNqNbbYUdYMjVYDxDtWIp3/Dy8VQ3N3Fz61SieS0GjJxDy/SyNByzVL4eEjk yYj+N74Dxgms1V/xknQmJn4ktwqaVxapnj52WF1WaEtIcm5WvPFZUVNSFvWMlbcD rAiTKkpFC0CkINlM+dk3Ti/a =cxV7 -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
92589cbdda
21 changed files with 1524 additions and 56 deletions
|
|
@ -344,7 +344,7 @@ struct rproc_ops {
|
|||
int (*stop)(struct rproc *rproc);
|
||||
void (*kick)(struct rproc *rproc, int vqid);
|
||||
void * (*da_to_va)(struct rproc *rproc, u64 da, int len);
|
||||
int (*load_rsc_table)(struct rproc *rproc, const struct firmware *fw);
|
||||
int (*parse_fw)(struct rproc *rproc, const struct firmware *fw);
|
||||
struct resource_table *(*find_loaded_rsc_table)(
|
||||
struct rproc *rproc, const struct firmware *fw);
|
||||
int (*load)(struct rproc *rproc, const struct firmware *fw);
|
||||
|
|
@ -394,6 +394,21 @@ enum rproc_crash_type {
|
|||
RPROC_FATAL_ERROR,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct rproc_dump_segment - segment info from ELF header
|
||||
* @node: list node related to the rproc segment list
|
||||
* @da: device address of the segment
|
||||
* @size: size of the segment
|
||||
*/
|
||||
struct rproc_dump_segment {
|
||||
struct list_head node;
|
||||
|
||||
dma_addr_t da;
|
||||
size_t size;
|
||||
|
||||
loff_t offset;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct rproc - represents a physical remote processor device
|
||||
* @node: list node of this rproc object
|
||||
|
|
@ -424,6 +439,7 @@ enum rproc_crash_type {
|
|||
* @cached_table: copy of the resource table
|
||||
* @table_sz: size of @cached_table
|
||||
* @has_iommu: flag to indicate if remote processor is behind an MMU
|
||||
* @dump_segments: list of segments in the firmware
|
||||
*/
|
||||
struct rproc {
|
||||
struct list_head node;
|
||||
|
|
@ -455,19 +471,21 @@ struct rproc {
|
|||
size_t table_sz;
|
||||
bool has_iommu;
|
||||
bool auto_boot;
|
||||
struct list_head dump_segments;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct rproc_subdev - subdevice tied to a remoteproc
|
||||
* @node: list node related to the rproc subdevs list
|
||||
* @probe: probe function, called as the rproc is started
|
||||
* @remove: remove function, called as the rproc is stopped
|
||||
* @remove: remove function, called as the rproc is being stopped, the @crashed
|
||||
* parameter indicates if this originates from the a recovery
|
||||
*/
|
||||
struct rproc_subdev {
|
||||
struct list_head node;
|
||||
|
||||
int (*probe)(struct rproc_subdev *subdev);
|
||||
void (*remove)(struct rproc_subdev *subdev);
|
||||
void (*remove)(struct rproc_subdev *subdev, bool crashed);
|
||||
};
|
||||
|
||||
/* we currently support only two vrings per rvdev */
|
||||
|
|
@ -534,6 +552,7 @@ void rproc_free(struct rproc *rproc);
|
|||
int rproc_boot(struct rproc *rproc);
|
||||
void rproc_shutdown(struct rproc *rproc);
|
||||
void rproc_report_crash(struct rproc *rproc, enum rproc_crash_type type);
|
||||
int rproc_coredump_add_segment(struct rproc *rproc, dma_addr_t da, size_t size);
|
||||
|
||||
static inline struct rproc_vdev *vdev_to_rvdev(struct virtio_device *vdev)
|
||||
{
|
||||
|
|
@ -550,7 +569,7 @@ static inline struct rproc *vdev_to_rproc(struct virtio_device *vdev)
|
|||
void rproc_add_subdev(struct rproc *rproc,
|
||||
struct rproc_subdev *subdev,
|
||||
int (*probe)(struct rproc_subdev *subdev),
|
||||
void (*remove)(struct rproc_subdev *subdev));
|
||||
void (*remove)(struct rproc_subdev *subdev, bool graceful));
|
||||
|
||||
void rproc_remove_subdev(struct rproc *rproc, struct rproc_subdev *subdev);
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ struct firmware;
|
|||
ssize_t qcom_mdt_get_size(const struct firmware *fw);
|
||||
int qcom_mdt_load(struct device *dev, const struct firmware *fw,
|
||||
const char *fw_name, int pas_id, void *mem_region,
|
||||
phys_addr_t mem_phys, size_t mem_size);
|
||||
phys_addr_t mem_phys, size_t mem_size,
|
||||
phys_addr_t *reloc_base);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue