diff options
-rw-r--r-- | include/linux/mm.h | 2 | ||||
-rw-r--r-- | init/main.c | 2 | ||||
-rw-r--r-- | mm/vmstat.c | 4 |
3 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 5f01c88f0800..00a8fa7e366a 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -32,6 +32,8 @@ struct user_struct; | |||
32 | struct writeback_control; | 32 | struct writeback_control; |
33 | struct bdi_writeback; | 33 | struct bdi_writeback; |
34 | 34 | ||
35 | void init_mm_internals(void); | ||
36 | |||
35 | #ifndef CONFIG_NEED_MULTIPLE_NODES /* Don't use mapnrs, do it properly */ | 37 | #ifndef CONFIG_NEED_MULTIPLE_NODES /* Don't use mapnrs, do it properly */ |
36 | extern unsigned long max_mapnr; | 38 | extern unsigned long max_mapnr; |
37 | 39 | ||
diff --git a/init/main.c b/init/main.c index f9c9d9948203..b0c11cbf5ddf 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -1022,6 +1022,8 @@ static noinline void __init kernel_init_freeable(void) | |||
1022 | 1022 | ||
1023 | workqueue_init(); | 1023 | workqueue_init(); |
1024 | 1024 | ||
1025 | init_mm_internals(); | ||
1026 | |||
1025 | do_pre_smp_initcalls(); | 1027 | do_pre_smp_initcalls(); |
1026 | lockup_detector_init(); | 1028 | lockup_detector_init(); |
1027 | 1029 | ||
diff --git a/mm/vmstat.c b/mm/vmstat.c index b1947f0cbee2..89f95396ec46 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c | |||
@@ -1764,7 +1764,7 @@ static int vmstat_cpu_dead(unsigned int cpu) | |||
1764 | 1764 | ||
1765 | #endif | 1765 | #endif |
1766 | 1766 | ||
1767 | static int __init setup_vmstat(void) | 1767 | void __init init_mm_internals(void) |
1768 | { | 1768 | { |
1769 | #ifdef CONFIG_SMP | 1769 | #ifdef CONFIG_SMP |
1770 | int ret; | 1770 | int ret; |
@@ -1792,9 +1792,7 @@ static int __init setup_vmstat(void) | |||
1792 | proc_create("vmstat", S_IRUGO, NULL, &proc_vmstat_file_operations); | 1792 | proc_create("vmstat", S_IRUGO, NULL, &proc_vmstat_file_operations); |
1793 | proc_create("zoneinfo", S_IRUGO, NULL, &proc_zoneinfo_file_operations); | 1793 | proc_create("zoneinfo", S_IRUGO, NULL, &proc_zoneinfo_file_operations); |
1794 | #endif | 1794 | #endif |
1795 | return 0; | ||
1796 | } | 1795 | } |
1797 | module_init(setup_vmstat) | ||
1798 | 1796 | ||
1799 | #if defined(CONFIG_DEBUG_FS) && defined(CONFIG_COMPACTION) | 1797 | #if defined(CONFIG_DEBUG_FS) && defined(CONFIG_COMPACTION) |
1800 | 1798 | ||