Lines Matching refs:cmem

190 	struct crash_mem *cmem;  in fill_up_crash_elf_data()  local
201 cmem = vzalloc(struct_size(cmem, ranges, nr_ranges)); in fill_up_crash_elf_data()
202 if (!cmem) in fill_up_crash_elf_data()
205 cmem->max_nr_ranges = nr_ranges; in fill_up_crash_elf_data()
206 cmem->nr_ranges = 0; in fill_up_crash_elf_data()
208 return cmem; in fill_up_crash_elf_data()
215 static int elf_header_exclude_ranges(struct crash_mem *cmem) in elf_header_exclude_ranges() argument
220 ret = crash_exclude_mem_range(cmem, 0, (1<<20)-1); in elf_header_exclude_ranges()
225 ret = crash_exclude_mem_range(cmem, crashk_res.start, crashk_res.end); in elf_header_exclude_ranges()
230 ret = crash_exclude_mem_range(cmem, crashk_low_res.start, in elf_header_exclude_ranges()
238 struct crash_mem *cmem = arg; in prepare_elf64_ram_headers_callback() local
240 cmem->ranges[cmem->nr_ranges].start = res->start; in prepare_elf64_ram_headers_callback()
241 cmem->ranges[cmem->nr_ranges].end = res->end; in prepare_elf64_ram_headers_callback()
242 cmem->nr_ranges++; in prepare_elf64_ram_headers_callback()
251 struct crash_mem *cmem; in prepare_elf_headers() local
254 cmem = fill_up_crash_elf_data(); in prepare_elf_headers()
255 if (!cmem) in prepare_elf_headers()
258 ret = walk_system_ram_res(0, -1, cmem, prepare_elf64_ram_headers_callback); in prepare_elf_headers()
263 ret = elf_header_exclude_ranges(cmem); in prepare_elf_headers()
268 ret = crash_prepare_elf64_headers(cmem, IS_ENABLED(CONFIG_X86_64), addr, sz); in prepare_elf_headers()
271 vfree(cmem); in prepare_elf_headers()
302 static int memmap_exclude_ranges(struct kimage *image, struct crash_mem *cmem, in memmap_exclude_ranges() argument
308 cmem->ranges[0].start = mstart; in memmap_exclude_ranges()
309 cmem->ranges[0].end = mend; in memmap_exclude_ranges()
310 cmem->nr_ranges = 1; in memmap_exclude_ranges()
315 return crash_exclude_mem_range(cmem, start, end); in memmap_exclude_ranges()
325 struct crash_mem *cmem; in crash_setup_memmap_entries() local
327 cmem = vzalloc(struct_size(cmem, ranges, 1)); in crash_setup_memmap_entries()
328 if (!cmem) in crash_setup_memmap_entries()
366 ret = memmap_exclude_ranges(image, cmem, crashk_res.start, crashk_res.end); in crash_setup_memmap_entries()
370 for (i = 0; i < cmem->nr_ranges; i++) { in crash_setup_memmap_entries()
371 ei.size = cmem->ranges[i].end - cmem->ranges[i].start + 1; in crash_setup_memmap_entries()
376 ei.addr = cmem->ranges[i].start; in crash_setup_memmap_entries()
382 vfree(cmem); in crash_setup_memmap_entries()