Skip to content

Commit 5e9426a

Browse files
Nishanth Aravamudantorvalds
authored andcommitted
mm: remove mm_init compilation dependency on CONFIG_DEBUG_MEMORY_INIT
Towards the end of putting all core mm initialization in mm_init.c, I plan on putting the creation of a mm kobject in a function in that file. However, the file is currently only compiled if CONFIG_DEBUG_MEMORY_INIT is set. Remove this dependency, but put the code under an #ifdef on the same config option. This should result in no functional changes. Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Cc: Mel Gorman <mel@csn.ul.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent a47a126 commit 5e9426a

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎mm/Makefile‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ obj-y := bootmem.o filemap.o mempool.o oom_kill.o fadvise.o \
1111
maccess.o page_alloc.o page-writeback.o pdflush.o \
1212
readahead.o swap.o truncate.o vmscan.o \
1313
prio_tree.o util.o mmzone.o vmstat.o backing-dev.o \
14-
page_isolation.o $(mmu-y)
14+
page_isolation.o mm_init.o $(mmu-y)
1515

1616
obj-$(CONFIG_PROC_PAGE_MONITOR) += pagewalk.o
1717
obj-$(CONFIG_BOUNCE) += bounce.o
@@ -26,7 +26,6 @@ obj-$(CONFIG_TMPFS_POSIX_ACL) += shmem_acl.o
2626
obj-$(CONFIG_TINY_SHMEM) += tiny-shmem.o
2727
obj-$(CONFIG_SLOB) += slob.o
2828
obj-$(CONFIG_SLAB) += slab.o
29-
obj-$(CONFIG_DEBUG_MEMORY_INIT) += mm_init.o
3029
obj-$(CONFIG_SLUB) += slub.o
3130
obj-$(CONFIG_MEMORY_HOTPLUG) += memory_hotplug.o
3231
obj-$(CONFIG_FS_XIP) += filemap_xip.o

‎mm/mm_init.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <linux/init.h>
1010
#include "internal.h"
1111

12+
#ifdef CONFIG_DEBUG_MEMORY_INIT
1213
int __meminitdata mminit_loglevel;
1314

1415
/* The zonelists are simply reported, validation is manual. */
@@ -132,3 +133,4 @@ static __init int set_mminit_loglevel(char *str)
132133
return 0;
133134
}
134135
early_param("mminit_loglevel", set_mminit_loglevel);
136+
#endif /* CONFIG_DEBUG_MEMORY_INIT */

0 commit comments

Comments
 (0)