lkml.org 
[lkml]   [2018]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC RESEND PATCH 3/6] mm, x86: make __kernel_map_pages always available
Date
__kernel_map_pages is currently only enabled when CONFIG_DEBUG_PAGEALLOC
is defined. Enable it unconditionally instead.

Signed-off-by: Julian Stecklina <jsteckli@amazon.de>
---
arch/x86/mm/pageattr.c | 3 +--
include/linux/mm.h | 3 ++-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index 51a5a69ecac9..bd3b194400c1 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -2025,8 +2025,6 @@ int set_pages_rw(struct page *page, int numpages)
return set_memory_rw(addr, numpages);
}

-#ifdef CONFIG_DEBUG_PAGEALLOC
-
static int __set_pages_p(struct page *page, int numpages)
{
unsigned long tempaddr = (unsigned long) page_address(page);
@@ -2093,6 +2091,7 @@ void __kernel_map_pages(struct page *page, int numpages, int enable)
arch_flush_lazy_mmu_mode();
}

+#ifdef CONFIG_DEBUG_PAGEALLOC
#ifdef CONFIG_HIBERNATION

bool kernel_page_present(struct page *page)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index a61ebe8ad4ca..a0b9feefebb1 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -2589,9 +2589,10 @@ static inline void kernel_poison_pages(struct page *page, int numpages,
int enable) { }
#endif

+extern void __kernel_map_pages(struct page *page, int numpages, int enable);
+
#ifdef CONFIG_DEBUG_PAGEALLOC
extern bool _debug_pagealloc_enabled;
-extern void __kernel_map_pages(struct page *page, int numpages, int enable);

static inline bool debug_pagealloc_enabled(void)
{
--
2.17.1
\
 
 \ /
  Last update: 2018-11-22 17:51    [W:0.064 / U:10.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site