aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/mm/pageattr.c6
-rw-r--r--include/linux/mm.h10
-rw-r--r--init/main.c5
-rw-r--r--mm/debug-pagealloc.c3
4 files changed, 0 insertions, 24 deletions
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index f9e526742fa..5031eefa051 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -1334,12 +1334,6 @@ void kernel_map_pages(struct page *page, int numpages, int enable)
1334 } 1334 }
1335 1335
1336 /* 1336 /*
1337 * If page allocator is not up yet then do not call c_p_a():
1338 */
1339 if (!debug_pagealloc_enabled)
1340 return;
1341
1342 /*
1343 * The return value is ignored as the calls cannot fail. 1337 * The return value is ignored as the calls cannot fail.
1344 * Large pages for identity mappings are not used at boot time 1338 * Large pages for identity mappings are not used at boot time
1345 * and hence no memory allocations during large page split. 1339 * and hence no memory allocations during large page split.
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 3dc3a8c2c48..0a22db14475 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1537,23 +1537,13 @@ static inline void vm_stat_account(struct mm_struct *mm,
1537#endif /* CONFIG_PROC_FS */ 1537#endif /* CONFIG_PROC_FS */
1538 1538
1539#ifdef CONFIG_DEBUG_PAGEALLOC 1539#ifdef CONFIG_DEBUG_PAGEALLOC
1540extern int debug_pagealloc_enabled;
1541
1542extern void kernel_map_pages(struct page *page, int numpages, int enable); 1540extern void kernel_map_pages(struct page *page, int numpages, int enable);
1543
1544static inline void enable_debug_pagealloc(void)
1545{
1546 debug_pagealloc_enabled = 1;
1547}
1548#ifdef CONFIG_HIBERNATION 1541#ifdef CONFIG_HIBERNATION
1549extern bool kernel_page_present(struct page *page); 1542extern bool kernel_page_present(struct page *page);
1550#endif /* CONFIG_HIBERNATION */ 1543#endif /* CONFIG_HIBERNATION */
1551#else 1544#else
1552static inline void 1545static inline void
1553kernel_map_pages(struct page *page, int numpages, int enable) {} 1546kernel_map_pages(struct page *page, int numpages, int enable) {}
1554static inline void enable_debug_pagealloc(void)
1555{
1556}
1557#ifdef CONFIG_HIBERNATION 1547#ifdef CONFIG_HIBERNATION
1558static inline bool kernel_page_present(struct page *page) { return true; } 1548static inline bool kernel_page_present(struct page *page) { return true; }
1559#endif /* CONFIG_HIBERNATION */ 1549#endif /* CONFIG_HIBERNATION */
diff --git a/init/main.c b/init/main.c
index 217ed23e948..99c4ba30ba7 100644
--- a/init/main.c
+++ b/init/main.c
@@ -282,10 +282,6 @@ static int __init unknown_bootoption(char *param, char *val)
282 return 0; 282 return 0;
283} 283}
284 284
285#ifdef CONFIG_DEBUG_PAGEALLOC
286int __read_mostly debug_pagealloc_enabled = 0;
287#endif
288
289static int __init init_setup(char *str) 285static int __init init_setup(char *str)
290{ 286{
291 unsigned int i; 287 unsigned int i;
@@ -597,7 +593,6 @@ asmlinkage void __init start_kernel(void)
597 } 593 }
598#endif 594#endif
599 page_cgroup_init(); 595 page_cgroup_init();
600 enable_debug_pagealloc();
601 debug_objects_mem_init(); 596 debug_objects_mem_init();
602 kmemleak_init(); 597 kmemleak_init();
603 setup_per_cpu_pageset(); 598 setup_per_cpu_pageset();
diff --git a/mm/debug-pagealloc.c b/mm/debug-pagealloc.c
index 7cea557407f..789ff70c8a4 100644
--- a/mm/debug-pagealloc.c
+++ b/mm/debug-pagealloc.c
@@ -95,9 +95,6 @@ static void unpoison_pages(struct page *page, int n)
95 95
96void kernel_map_pages(struct page *page, int numpages, int enable) 96void kernel_map_pages(struct page *page, int numpages, int enable)
97{ 97{
98 if (!debug_pagealloc_enabled)
99 return;
100
101 if (enable) 98 if (enable)
102 unpoison_pages(page, numpages); 99 unpoison_pages(page, numpages);
103 else 100 else