diff options
author | KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> | 2009-09-22 19:45:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 10:39:42 -0400 |
commit | 81ac3ad9061dd9cd490ee92f0c5316a14d77ce18 (patch) | |
tree | 1787b8c307b5e70e2763c4e7c0767c2b7e108dc4 /arch/x86/mm/init_64.c | |
parent | 26562c59fa9111ae3ea7b78045889662aac9e5ac (diff) |
kcore: register module area in generic way
Some archs define MODULED_VADDR/MODULES_END which is not in VMALLOC area.
This is handled only in x86-64. This patch make it more generic. And we
can use vread/vwrite to access the area. Fix it.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Jiri Slaby <jirislaby@gmail.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 'arch/x86/mm/init_64.c')
-rw-r--r-- | arch/x86/mm/init_64.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index d5d23cc24076..5a4398a6006b 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
@@ -647,7 +647,7 @@ EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid); | |||
647 | 647 | ||
648 | #endif /* CONFIG_MEMORY_HOTPLUG */ | 648 | #endif /* CONFIG_MEMORY_HOTPLUG */ |
649 | 649 | ||
650 | static struct kcore_list kcore_modules, kcore_vsyscall; | 650 | static struct kcore_list kcore_vsyscall; |
651 | 651 | ||
652 | void __init mem_init(void) | 652 | void __init mem_init(void) |
653 | { | 653 | { |
@@ -676,8 +676,6 @@ void __init mem_init(void) | |||
676 | initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; | 676 | initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; |
677 | 677 | ||
678 | /* Register memory areas for /proc/kcore */ | 678 | /* Register memory areas for /proc/kcore */ |
679 | kclist_add(&kcore_modules, (void *)MODULES_VADDR, MODULES_LEN, | ||
680 | KCORE_OTHER); | ||
681 | kclist_add(&kcore_vsyscall, (void *)VSYSCALL_START, | 679 | kclist_add(&kcore_vsyscall, (void *)VSYSCALL_START, |
682 | VSYSCALL_END - VSYSCALL_START, KCORE_OTHER); | 680 | VSYSCALL_END - VSYSCALL_START, KCORE_OTHER); |
683 | 681 | ||