Lines Matching refs:segment

49 	struct rproc_dump_segment *segment;  in rproc_coredump_add_segment()  local
51 segment = kzalloc(sizeof(*segment), GFP_KERNEL); in rproc_coredump_add_segment()
52 if (!segment) in rproc_coredump_add_segment()
55 segment->da = da; in rproc_coredump_add_segment()
56 segment->size = size; in rproc_coredump_add_segment()
58 list_add_tail(&segment->node, &rproc->dump_segments); in rproc_coredump_add_segment()
81 struct rproc_dump_segment *segment, in rproc_coredump_add_custom_segment() argument
86 struct rproc_dump_segment *segment; in rproc_coredump_add_custom_segment() local
88 segment = kzalloc(sizeof(*segment), GFP_KERNEL); in rproc_coredump_add_custom_segment()
89 if (!segment) in rproc_coredump_add_custom_segment()
92 segment->da = da; in rproc_coredump_add_custom_segment()
93 segment->size = size; in rproc_coredump_add_custom_segment()
94 segment->priv = priv; in rproc_coredump_add_custom_segment()
95 segment->dump = dumpfn; in rproc_coredump_add_custom_segment()
97 list_add_tail(&segment->node, &rproc->dump_segments); in rproc_coredump_add_custom_segment()
137 struct rproc_dump_segment *segment; in rproc_coredump_find_segment() local
139 list_for_each_entry(segment, segments, node) { in rproc_coredump_find_segment()
140 if (user_offset < segment->size) { in rproc_coredump_find_segment()
141 *data_left = segment->size - user_offset; in rproc_coredump_find_segment()
142 return segment; in rproc_coredump_find_segment()
144 user_offset -= segment->size; in rproc_coredump_find_segment()
152 struct rproc_dump_segment *segment, in rproc_copy_segment() argument
158 if (segment->dump) { in rproc_copy_segment()
159 segment->dump(rproc, segment, dest, offset, size); in rproc_copy_segment()
161 ptr = rproc_da_to_va(rproc, segment->da + offset, size, &is_iomem); in rproc_copy_segment()
165 &segment->da, offset, size); in rproc_copy_segment()
236 struct rproc_dump_segment *segment; in rproc_coredump() local
257 list_for_each_entry(segment, &rproc->dump_segments, node) { in rproc_coredump()
265 data_size += segment->size; in rproc_coredump()
293 list_for_each_entry(segment, &rproc->dump_segments, node) { in rproc_coredump()
297 elf_phdr_set_p_vaddr(class, phdr, segment->da); in rproc_coredump()
298 elf_phdr_set_p_paddr(class, phdr, segment->da); in rproc_coredump()
299 elf_phdr_set_p_filesz(class, phdr, segment->size); in rproc_coredump()
300 elf_phdr_set_p_memsz(class, phdr, segment->size); in rproc_coredump()
305 rproc_copy_segment(rproc, data + offset, segment, 0, in rproc_coredump()
306 segment->size); in rproc_coredump()
345 struct rproc_dump_segment *segment; in rproc_coredump_using_sections() local
379 list_for_each_entry(segment, &rproc->dump_segments, node) { in rproc_coredump_using_sections()
381 strtbl_size += strlen(segment->priv) + 1; in rproc_coredump_using_sections()
383 data_size += segment->size; in rproc_coredump_using_sections()
432 list_for_each_entry(segment, &rproc->dump_segments, node) { in rproc_coredump_using_sections()
436 elf_shdr_set_sh_addr(class, shdr, segment->da); in rproc_coredump_using_sections()
437 elf_shdr_set_sh_size(class, shdr, segment->size); in rproc_coredump_using_sections()
441 elf_strtbl_add(segment->priv, ehdr, class, &strtbl_index)); in rproc_coredump_using_sections()
445 rproc_copy_segment(rproc, data + offset, segment, 0, in rproc_coredump_using_sections()
446 segment->size); in rproc_coredump_using_sections()