1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * /proc/kcore definitions 4 */ 5 #ifndef _LINUX_KCORE_H 6 #define _LINUX_KCORE_H 7 8 enum kcore_type { 9 KCORE_TEXT, 10 KCORE_VMALLOC, 11 KCORE_RAM, 12 KCORE_VMEMMAP, 13 KCORE_USER, 14 KCORE_OTHER, 15 KCORE_REMAP, 16 }; 17 18 struct kcore_list { 19 struct list_head list; 20 unsigned long addr; 21 unsigned long vaddr; 22 size_t size; 23 int type; 24 }; 25 26 struct vmcore { 27 struct list_head list; 28 unsigned long long paddr; 29 unsigned long long size; 30 loff_t offset; 31 }; 32 33 struct vmcoredd_node { 34 struct list_head list; /* List of dumps */ 35 void *buf; /* Buffer containing device's dump */ 36 unsigned int size; /* Size of the buffer */ 37 }; 38 39 #ifdef CONFIG_PROC_KCORE 40 void __init kclist_add(struct kcore_list *, void *, size_t, int type); 41 #else 42 static inline 43 void kclist_add(struct kcore_list *new, void *addr, size_t size, int type) 44 { 45 } 46 #endif 47 48 #endif /* _LINUX_KCORE_H */ 49