Lines Matching refs:mem_ranges

77 static int __add_mem_range(struct crash_mem **mem_ranges, u64 base, u64 size)  in __add_mem_range()  argument
79 struct crash_mem *mem_rngs = *mem_ranges; in __add_mem_range()
82 mem_rngs = realloc_mem_ranges(mem_ranges); in __add_mem_range()
177 struct crash_mem *realloc_mem_ranges(struct crash_mem **mem_ranges) in realloc_mem_ranges() argument
179 struct crash_mem *mem_rngs = *mem_ranges; in realloc_mem_ranges()
187 mem_rngs = krealloc(*mem_ranges, size, GFP_KERNEL); in realloc_mem_ranges()
189 kfree(*mem_ranges); in realloc_mem_ranges()
190 *mem_ranges = NULL; in realloc_mem_ranges()
196 *mem_ranges = mem_rngs; in realloc_mem_ranges()
212 int add_mem_range(struct crash_mem **mem_ranges, u64 base, u64 size) in add_mem_range() argument
214 struct crash_mem *mem_rngs = *mem_ranges; in add_mem_range()
224 return __add_mem_range(mem_ranges, base, size); in add_mem_range()
238 return __add_mem_range(mem_ranges, base, size); in add_mem_range()
250 static int add_tce_mem_ranges(struct crash_mem **mem_ranges) in add_tce_mem_ranges() argument
273 ret = add_mem_range(mem_ranges, base, size); in add_tce_mem_ranges()
289 static int add_initrd_mem_range(struct crash_mem **mem_ranges) in add_initrd_mem_range() argument
301 ret = add_mem_range(mem_ranges, base, end - base + 1); in add_initrd_mem_range()
313 static int add_htab_mem_range(struct crash_mem **mem_ranges) in add_htab_mem_range() argument
320 return add_mem_range(mem_ranges, __pa(htab_address), htab_size_bytes); in add_htab_mem_range()
333 static int add_kernel_mem_range(struct crash_mem **mem_ranges) in add_kernel_mem_range() argument
335 return add_mem_range(mem_ranges, 0, __pa(_end)); in add_kernel_mem_range()
346 static int add_rtas_mem_range(struct crash_mem **mem_ranges) in add_rtas_mem_range() argument
359 ret = add_mem_range(mem_ranges, base, size); in add_rtas_mem_range()
371 static int add_opal_mem_range(struct crash_mem **mem_ranges) in add_opal_mem_range() argument
384 ret = add_mem_range(mem_ranges, base, size); in add_opal_mem_range()
399 static int add_reserved_mem_ranges(struct crash_mem **mem_ranges) in add_reserved_mem_ranges() argument
422 ret = add_mem_range(mem_ranges, base, size); in add_reserved_mem_ranges()
439 int get_reserved_memory_ranges(struct crash_mem **mem_ranges) in get_reserved_memory_ranges() argument
443 ret = add_rtas_mem_range(mem_ranges); in get_reserved_memory_ranges()
447 ret = add_tce_mem_ranges(mem_ranges); in get_reserved_memory_ranges()
451 ret = add_reserved_mem_ranges(mem_ranges); in get_reserved_memory_ranges()
467 int get_exclude_memory_ranges(struct crash_mem **mem_ranges) in get_exclude_memory_ranges() argument
471 ret = add_tce_mem_ranges(mem_ranges); in get_exclude_memory_ranges()
475 ret = add_initrd_mem_range(mem_ranges); in get_exclude_memory_ranges()
479 ret = add_htab_mem_range(mem_ranges); in get_exclude_memory_ranges()
483 ret = add_kernel_mem_range(mem_ranges); in get_exclude_memory_ranges()
487 ret = add_rtas_mem_range(mem_ranges); in get_exclude_memory_ranges()
491 ret = add_opal_mem_range(mem_ranges); in get_exclude_memory_ranges()
495 ret = add_reserved_mem_ranges(mem_ranges); in get_exclude_memory_ranges()
500 sort_memory_ranges(*mem_ranges, true); in get_exclude_memory_ranges()
516 int get_usable_memory_ranges(struct crash_mem **mem_ranges) in get_usable_memory_ranges() argument
527 ret = add_mem_range(mem_ranges, 0, crashk_res.end + 1); in get_usable_memory_ranges()
531 ret = add_rtas_mem_range(mem_ranges); in get_usable_memory_ranges()
535 ret = add_opal_mem_range(mem_ranges); in get_usable_memory_ranges()
539 ret = add_tce_mem_ranges(mem_ranges); in get_usable_memory_ranges()
557 int get_crash_memory_ranges(struct crash_mem **mem_ranges) in get_crash_memory_ranges() argument
576 ret = add_mem_range(mem_ranges, base, size); in get_crash_memory_ranges()
581 if ((*mem_ranges)->nr_ranges == (*mem_ranges)->max_nr_ranges) in get_crash_memory_ranges()
582 sort_memory_ranges(*mem_ranges, true); in get_crash_memory_ranges()
586 tmem = *mem_ranges; in get_crash_memory_ranges()
588 tmem = realloc_mem_ranges(mem_ranges); in get_crash_memory_ranges()
604 ret = add_rtas_mem_range(mem_ranges); in get_crash_memory_ranges()
608 ret = add_opal_mem_range(mem_ranges); in get_crash_memory_ranges()
613 ret = add_mem_range(mem_ranges, BACKUP_SRC_START, BACKUP_SRC_SIZE); in get_crash_memory_ranges()
617 sort_memory_ranges(*mem_ranges, false); in get_crash_memory_ranges()
634 int remove_mem_range(struct crash_mem **mem_ranges, u64 base, u64 size) in remove_mem_range() argument
640 struct crash_mem *mem_rngs = *mem_ranges; in remove_mem_range()
702 ret = add_mem_range(mem_ranges, end + 1, size); in remove_mem_range()