diff options
author | KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> | 2009-09-22 19:45:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 10:39:41 -0400 |
commit | c30bb2a25fcfde6157e6154a32c14686fb0bedbe (patch) | |
tree | afa4811d46e5f9035a035b2c8c864bbb6c5af049 /include/linux | |
parent | 2ef43ec772551e975a6ea7cf22b59c84955aadf9 (diff) |
kcore: add kclist types
Presently, kclist_add() only eats start address and size as its arguments.
Considering to make kclist dynamically reconfigulable, it's necessary to
know which kclists are for System RAM and which are not.
This patch add kclist types as
KCORE_RAM
KCORE_VMALLOC
KCORE_TEXT
KCORE_OTHER
This "type" is used in a patch following this for detecting KCORE_RAM.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/proc_fs.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 0aff2a62eba9..bd7b840765a0 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -78,10 +78,18 @@ struct proc_dir_entry { | |||
78 | struct list_head pde_openers; /* who did ->open, but not ->release */ | 78 | struct list_head pde_openers; /* who did ->open, but not ->release */ |
79 | }; | 79 | }; |
80 | 80 | ||
81 | enum kcore_type { | ||
82 | KCORE_TEXT, | ||
83 | KCORE_VMALLOC, | ||
84 | KCORE_RAM, | ||
85 | KCORE_OTHER, | ||
86 | }; | ||
87 | |||
81 | struct kcore_list { | 88 | struct kcore_list { |
82 | struct list_head list; | 89 | struct list_head list; |
83 | unsigned long addr; | 90 | unsigned long addr; |
84 | size_t size; | 91 | size_t size; |
92 | int type; | ||
85 | }; | 93 | }; |
86 | 94 | ||
87 | struct vmcore { | 95 | struct vmcore { |
@@ -233,11 +241,12 @@ static inline void dup_mm_exe_file(struct mm_struct *oldmm, | |||
233 | #endif /* CONFIG_PROC_FS */ | 241 | #endif /* CONFIG_PROC_FS */ |
234 | 242 | ||
235 | #if !defined(CONFIG_PROC_KCORE) | 243 | #if !defined(CONFIG_PROC_KCORE) |
236 | static inline void kclist_add(struct kcore_list *new, void *addr, size_t size) | 244 | static inline void |
245 | kclist_add(struct kcore_list *new, void *addr, size_t size, int type) | ||
237 | { | 246 | { |
238 | } | 247 | } |
239 | #else | 248 | #else |
240 | extern void kclist_add(struct kcore_list *, void *, size_t); | 249 | extern void kclist_add(struct kcore_list *, void *, size_t, int type); |
241 | #endif | 250 | #endif |
242 | 251 | ||
243 | union proc_op { | 252 | union proc_op { |