Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

remoteproc: core: Export the rproc coredump APIs

The remoteproc coredump APIs are currently only part of the internal
remoteproc header. This prevents the remoteproc platform drivers from
using these APIs when needed. This change moves the rproc_coredump()
and rproc_coredump_cleanup() APIs to the linux header and marks them
as exported symbols.

Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
Signed-off-by: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com>
Link: https://lore.kernel.org/r/20230224211707.30916-2-quic_gokukris@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>

authored by

Siddharth Gupta and committed by
Bjorn Andersson
f247f08d 0ee55c18

+6 -4
+2
drivers/remoteproc/remoteproc_coredump.c
··· 32 32 kfree(entry); 33 33 } 34 34 } 35 + EXPORT_SYMBOL_GPL(rproc_coredump_cleanup); 35 36 36 37 /** 37 38 * rproc_coredump_add_segment() - add segment of device memory to coredump ··· 328 327 */ 329 328 wait_for_completion(&dump_state.dump_done); 330 329 } 330 + EXPORT_SYMBOL_GPL(rproc_coredump); 331 331 332 332 /** 333 333 * rproc_coredump_using_sections() - perform coredump using section headers
-4
drivers/remoteproc/remoteproc_internal.h
··· 76 76 int rproc_init_sysfs(void); 77 77 void rproc_exit_sysfs(void); 78 78 79 - /* from remoteproc_coredump.c */ 80 - void rproc_coredump_cleanup(struct rproc *rproc); 81 - void rproc_coredump(struct rproc *rproc); 82 - 83 79 #ifdef CONFIG_REMOTEPROC_CDEV 84 80 void rproc_init_cdev(void); 85 81 void rproc_exit_cdev(void);
+4
include/linux/remoteproc.h
··· 690 690 int rproc_set_firmware(struct rproc *rproc, const char *fw_name); 691 691 void rproc_report_crash(struct rproc *rproc, enum rproc_crash_type type); 692 692 void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem); 693 + 694 + /* from remoteproc_coredump.c */ 695 + void rproc_coredump_cleanup(struct rproc *rproc); 696 + void rproc_coredump(struct rproc *rproc); 693 697 void rproc_coredump_using_sections(struct rproc *rproc); 694 698 int rproc_coredump_add_segment(struct rproc *rproc, dma_addr_t da, size_t size); 695 699 int rproc_coredump_add_custom_segment(struct rproc *rproc,