1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 #ifndef _ASM_POWERPC_KEXEC_RANGES_H 3 #define _ASM_POWERPC_KEXEC_RANGES_H 4 5 #define MEM_RANGE_CHUNK_SZ 2048 /* Memory ranges size chunk */ 6 7 void sort_memory_ranges(struct crash_mem *mrngs, bool merge); 8 struct crash_mem *realloc_mem_ranges(struct crash_mem **mem_ranges); 9 int add_mem_range(struct crash_mem **mem_ranges, u64 base, u64 size); 10 int add_tce_mem_ranges(struct crash_mem **mem_ranges); 11 int add_initrd_mem_range(struct crash_mem **mem_ranges); 12 #ifdef CONFIG_PPC_64S_HASH_MMU 13 int add_htab_mem_range(struct crash_mem **mem_ranges); 14 #else add_htab_mem_range(struct crash_mem ** mem_ranges)15static inline int add_htab_mem_range(struct crash_mem **mem_ranges) 16 { 17 return 0; 18 } 19 #endif 20 int add_kernel_mem_range(struct crash_mem **mem_ranges); 21 int add_rtas_mem_range(struct crash_mem **mem_ranges); 22 int add_opal_mem_range(struct crash_mem **mem_ranges); 23 int add_reserved_mem_ranges(struct crash_mem **mem_ranges); 24 25 #endif /* _ASM_POWERPC_KEXEC_RANGES_H */ 26