diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 05:20:58 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 05:20:58 -0400 |
commit | 2cb7ce3bb384f30a377f66336c78546b834604df (patch) | |
tree | 8954cf1acdb07acba9a2014771720d0da2670358 /arch/sh | |
parent | d153ea88dccf003173315b5d21acabebb897fb4a (diff) |
sh: Enable /proc/kcore support.
This was previously unimplemented..
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/mm/init.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index 2c6dc3d8df2..ad182b31d84 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <linux/highmem.h> | 24 | #include <linux/highmem.h> |
25 | #include <linux/bootmem.h> | 25 | #include <linux/bootmem.h> |
26 | #include <linux/pagemap.h> | 26 | #include <linux/pagemap.h> |
27 | 27 | #include <linux/proc_fs.h> | |
28 | #include <asm/processor.h> | 28 | #include <asm/processor.h> |
29 | #include <asm/system.h> | 29 | #include <asm/system.h> |
30 | #include <asm/uaccess.h> | 30 | #include <asm/uaccess.h> |
@@ -223,6 +223,8 @@ void __init paging_init(void) | |||
223 | free_area_init_node(0, NODE_DATA(0), zones_size, __MEMORY_START >> PAGE_SHIFT, 0); | 223 | free_area_init_node(0, NODE_DATA(0), zones_size, __MEMORY_START >> PAGE_SHIFT, 0); |
224 | } | 224 | } |
225 | 225 | ||
226 | static struct kcore_list kcore_mem, kcore_vmalloc; | ||
227 | |||
226 | void __init mem_init(void) | 228 | void __init mem_init(void) |
227 | { | 229 | { |
228 | extern unsigned long empty_zero_page[1024]; | 230 | extern unsigned long empty_zero_page[1024]; |
@@ -270,7 +272,12 @@ void __init mem_init(void) | |||
270 | datasize = (unsigned long) &_edata - (unsigned long) &_etext; | 272 | datasize = (unsigned long) &_edata - (unsigned long) &_etext; |
271 | initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; | 273 | initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; |
272 | 274 | ||
273 | printk("Memory: %luk/%luk available (%dk kernel code, %dk reserved, %dk data, %dk init)\n", | 275 | kclist_add(&kcore_mem, __va(0), max_low_pfn << PAGE_SHIFT); |
276 | kclist_add(&kcore_vmalloc, (void *)VMALLOC_START, | ||
277 | VMALLOC_END - VMALLOC_START); | ||
278 | |||
279 | printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, " | ||
280 | "%dk reserved, %dk data, %dk init)\n", | ||
274 | (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), | 281 | (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), |
275 | max_mapnr << (PAGE_SHIFT-10), | 282 | max_mapnr << (PAGE_SHIFT-10), |
276 | codesize >> 10, | 283 | codesize >> 10, |