Lines Matching full:rproc
17 struct rproc *rproc; member
24 * @rproc: the remote processor handle
26 void rproc_coredump_cleanup(struct rproc *rproc) in rproc_coredump_cleanup() argument
30 list_for_each_entry_safe(entry, tmp, &rproc->dump_segments, node) { in rproc_coredump_cleanup()
38 * @rproc: handle of a remote processor
47 int rproc_coredump_add_segment(struct rproc *rproc, dma_addr_t da, size_t size) in rproc_coredump_add_segment() argument
58 list_add_tail(&segment->node, &rproc->dump_segments); in rproc_coredump_add_segment()
66 * @rproc: handle of a remote processor
78 int rproc_coredump_add_custom_segment(struct rproc *rproc, in rproc_coredump_add_custom_segment() argument
80 void (*dumpfn)(struct rproc *rproc, in rproc_coredump_add_custom_segment() argument
97 list_add_tail(&segment->node, &rproc->dump_segments); in rproc_coredump_add_custom_segment()
105 * @rproc: handle of a remote processor
113 int rproc_coredump_set_elf_info(struct rproc *rproc, u8 class, u16 machine) in rproc_coredump_set_elf_info() argument
118 rproc->elf_class = class; in rproc_coredump_set_elf_info()
119 rproc->elf_machine = machine; in rproc_coredump_set_elf_info()
151 static void rproc_copy_segment(struct rproc *rproc, void *dest, in rproc_copy_segment() argument
158 segment->dump(rproc, segment, dest, offset, size); in rproc_copy_segment()
160 ptr = rproc_da_to_va(rproc, segment->da + offset, size); in rproc_copy_segment()
162 dev_err(&rproc->dev, in rproc_copy_segment()
179 struct rproc *rproc = dump_state->rproc; in rproc_coredump_read() local
196 &rproc->dump_segments, in rproc_coredump_read()
200 dev_info(&rproc->dev, "Ramdump done, %lld bytes read", in rproc_coredump_read()
207 rproc_copy_segment(rproc, buffer, seg, seg->size - seg_data, in rproc_coredump_read()
220 * @rproc: rproc handle
223 * and create a devcoredump device associated with rproc. Based on the
230 void rproc_coredump(struct rproc *rproc) in rproc_coredump() argument
238 u8 class = rproc->elf_class; in rproc_coredump()
241 enum rproc_dump_mechanism dump_conf = rproc->dump_conf; in rproc_coredump()
243 if (list_empty(&rproc->dump_segments) || in rproc_coredump()
248 dev_err(&rproc->dev, "Elf class is not set\n"); in rproc_coredump()
253 list_for_each_entry(segment, &rproc->dump_segments, node) { in rproc_coredump()
277 elf_hdr_set_e_machine(class, ehdr, rproc->elf_machine); in rproc_coredump()
279 elf_hdr_set_e_entry(class, ehdr, rproc->bootaddr); in rproc_coredump()
289 list_for_each_entry(segment, &rproc->dump_segments, node) { in rproc_coredump()
301 rproc_copy_segment(rproc, data + offset, segment, 0, in rproc_coredump()
308 dev_coredumpv(&rproc->dev, data, data_size, GFP_KERNEL); in rproc_coredump()
313 dump_state.rproc = rproc; in rproc_coredump()
317 dev_coredumpm(&rproc->dev, NULL, &dump_state, data_size, GFP_KERNEL, in rproc_coredump()