Lines Matching refs:cmem
274 struct crash_mem *cmem; in alloc_cmem() local
276 cmem = kvzalloc_flex(*cmem, ranges, nr_ranges); in alloc_cmem()
277 if (!cmem) in alloc_cmem()
280 cmem->max_nr_ranges = nr_ranges; in alloc_cmem()
281 return cmem; in alloc_cmem()
285 int __weak arch_crash_populate_cmem(struct crash_mem *cmem) { return -1; } in arch_crash_populate_cmem() argument
286 int __weak arch_crash_exclude_ranges(struct crash_mem *cmem) { return 0; } in arch_crash_exclude_ranges() argument
295 int crash_exclude_core_ranges(struct crash_mem **cmem) in crash_exclude_core_ranges() argument
300 ret = arch_crash_exclude_mem_range(cmem, crashk_res.start, crashk_res.end); in crash_exclude_core_ranges()
305 ret = arch_crash_exclude_mem_range(cmem, crashk_low_res.start, crashk_low_res.end); in crash_exclude_core_ranges()
311 ret = arch_crash_exclude_mem_range(cmem, crashk_cma_ranges[i].start, in crash_exclude_core_ranges()
324 struct crash_mem *cmem; in crash_prepare_headers() local
331 cmem = alloc_cmem(max_nr_ranges); in crash_prepare_headers()
332 if (!cmem) in crash_prepare_headers()
335 ret = arch_crash_populate_cmem(cmem); in crash_prepare_headers()
339 ret = crash_exclude_core_ranges(&cmem); in crash_prepare_headers()
343 ret = arch_crash_exclude_ranges(cmem); in crash_prepare_headers()
349 *nr_mem_ranges = cmem->nr_ranges; in crash_prepare_headers()
351 ret = crash_prepare_elf64_headers(cmem, need_kernel_map, addr, sz); in crash_prepare_headers()
354 kvfree(cmem); in crash_prepare_headers()