Messages in this thread Patch in this message | | | From | Julian Stecklina <> | Subject | [RFC RESEND PATCH 3/6] mm, x86: make __kernel_map_pages always available | Date | Thu, 22 Nov 2018 17:49:36 +0100 |
| |
__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
| |