blob: c20f296438fbb84997474cb681a51e57eef558ef [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
David Howells2f96b8c2013-04-12 00:10:25 +01002/*
3 * /proc/kcore definitions
4 */
5#ifndef _LINUX_KCORE_H
6#define _LINUX_KCORE_H
7
8enum kcore_type {
9 KCORE_TEXT,
10 KCORE_VMALLOC,
11 KCORE_RAM,
12 KCORE_VMEMMAP,
Jia Zhang595dd462018-02-12 22:44:53 +080013 KCORE_USER,
David Howells2f96b8c2013-04-12 00:10:25 +010014 KCORE_OTHER,
15};
16
17struct kcore_list {
18 struct list_head list;
19 unsigned long addr;
20 size_t size;
21 int type;
22};
23
24struct vmcore {
25 struct list_head list;
26 unsigned long long paddr;
27 unsigned long long size;
28 loff_t offset;
29};
30
Rahul Lakkireddy27242732018-05-02 15:17:17 +053031struct vmcoredd_node {
32 struct list_head list; /* List of dumps */
33 void *buf; /* Buffer containing device's dump */
34 unsigned int size; /* Size of the buffer */
35};
36
David Howells2f96b8c2013-04-12 00:10:25 +010037#ifdef CONFIG_PROC_KCORE
Omar Sandovala8dd9c42018-08-21 21:54:51 -070038void __init kclist_add(struct kcore_list *, void *, size_t, int type);
David Howells2f96b8c2013-04-12 00:10:25 +010039#else
40static inline
41void kclist_add(struct kcore_list *new, void *addr, size_t size, int type)
42{
43}
44#endif
45
46#endif /* _LINUX_KCORE_H */