diff options
Diffstat (limited to 'include/linux/kcore.h')
| -rw-r--r-- | include/linux/kcore.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/include/linux/kcore.h b/include/linux/kcore.h new file mode 100644 index 000000000000..d92762286645 --- /dev/null +++ b/include/linux/kcore.h | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | /* | ||
| 2 | * /proc/kcore definitions | ||
| 3 | */ | ||
| 4 | #ifndef _LINUX_KCORE_H | ||
| 5 | #define _LINUX_KCORE_H | ||
| 6 | |||
| 7 | enum kcore_type { | ||
| 8 | KCORE_TEXT, | ||
| 9 | KCORE_VMALLOC, | ||
| 10 | KCORE_RAM, | ||
| 11 | KCORE_VMEMMAP, | ||
| 12 | KCORE_OTHER, | ||
| 13 | }; | ||
| 14 | |||
| 15 | struct kcore_list { | ||
| 16 | struct list_head list; | ||
| 17 | unsigned long addr; | ||
| 18 | size_t size; | ||
| 19 | int type; | ||
| 20 | }; | ||
| 21 | |||
| 22 | struct vmcore { | ||
| 23 | struct list_head list; | ||
| 24 | unsigned long long paddr; | ||
| 25 | unsigned long long size; | ||
| 26 | loff_t offset; | ||
| 27 | }; | ||
| 28 | |||
| 29 | #ifdef CONFIG_PROC_KCORE | ||
| 30 | extern void kclist_add(struct kcore_list *, void *, size_t, int type); | ||
| 31 | #else | ||
| 32 | static inline | ||
| 33 | void kclist_add(struct kcore_list *new, void *addr, size_t size, int type) | ||
| 34 | { | ||
| 35 | } | ||
| 36 | #endif | ||
| 37 | |||
| 38 | #endif /* _LINUX_KCORE_H */ | ||
