From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754159AbcA0IvF (ORCPT ); Wed, 27 Jan 2016 03:51:05 -0500 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:41005 "EHLO e06smtp10.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754028AbcA0IuD (ORCPT ); Wed, 27 Jan 2016 03:50:03 -0500 X-IBM-Helo: d06dlp03.portsmouth.uk.ibm.com X-IBM-MailFrom: borntraeger@de.ibm.com X-IBM-RcptTo: linux-arch@vger.kernel.org;linux-kernel@vger.kernel.org;linux-s390@vger.kernel.org From: Christian Borntraeger To: linux-kernel@vger.kernel.org Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, x86@kernel.org, linuxppc-dev@lists.ozlabs.org, davem@davemloft.net, Joonsoo Kim , davej@codemonkey.org.uk, Christian Borntraeger Subject: [PATCH v2 1/3] mm: provide debug_pagealloc_enabled() without CONFIG_DEBUG_PAGEALLOC Date: Wed, 27 Jan 2016 09:50:16 +0100 Message-Id: <1453884618-33852-2-git-send-email-borntraeger@de.ibm.com> X-Mailer: git-send-email 2.3.0 In-Reply-To: <1453884618-33852-1-git-send-email-borntraeger@de.ibm.com> References: <1453884618-33852-1-git-send-email-borntraeger@de.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16012708-0041-0000-0000-00000710FB4D Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We can provide debug_pagealloc_enabled() also if CONFIG_DEBUG_PAGEALLOC is not set. It will return false in that case. Signed-off-by: Christian Borntraeger Acked-by: David Rientjes --- include/linux/mm.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 7783073..56cab4e 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2147,13 +2147,18 @@ kernel_map_pages(struct page *page, int numpages, int enable) #ifdef CONFIG_HIBERNATION extern bool kernel_page_present(struct page *page); #endif /* CONFIG_HIBERNATION */ -#else +#else /* CONFIG_DEBUG_PAGEALLOC */ +static inline bool debug_pagealloc_enabled(void) +{ + return false; +} + static inline void kernel_map_pages(struct page *page, int numpages, int enable) {} #ifdef CONFIG_HIBERNATION static inline bool kernel_page_present(struct page *page) { return true; } #endif /* CONFIG_HIBERNATION */ -#endif +#endif /* CONFIG_DEBUG_PAGEALLOC */ #ifdef __HAVE_ARCH_GATE_AREA extern struct vm_area_struct *get_gate_vma(struct mm_struct *mm); -- 2.3.0 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Borntraeger Subject: [PATCH v2 1/3] mm: provide debug_pagealloc_enabled() without CONFIG_DEBUG_PAGEALLOC Date: Wed, 27 Jan 2016 09:50:16 +0100 Message-ID: <1453884618-33852-2-git-send-email-borntraeger@de.ibm.com> References: <1453884618-33852-1-git-send-email-borntraeger@de.ibm.com> Return-path: In-Reply-To: <1453884618-33852-1-git-send-email-borntraeger@de.ibm.com> Sender: owner-linux-mm@kvack.org List-Archive: List-Post: To: linux-kernel@vger.kernel.org Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, x86@kernel.org, linuxppc-dev@lists.ozlabs.org, davem@davemloft.net, Joonsoo Kim , davej@codemonkey.org.uk, Christian Borntraeger List-ID: We can provide debug_pagealloc_enabled() also if CONFIG_DEBUG_PAGEALLOC is not set. It will return false in that case. Signed-off-by: Christian Borntraeger Acked-by: David Rientjes --- include/linux/mm.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 7783073..56cab4e 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2147,13 +2147,18 @@ kernel_map_pages(struct page *page, int numpages, int enable) #ifdef CONFIG_HIBERNATION extern bool kernel_page_present(struct page *page); #endif /* CONFIG_HIBERNATION */ -#else +#else /* CONFIG_DEBUG_PAGEALLOC */ +static inline bool debug_pagealloc_enabled(void) +{ + return false; +} + static inline void kernel_map_pages(struct page *page, int numpages, int enable) {} #ifdef CONFIG_HIBERNATION static inline bool kernel_page_present(struct page *page) { return true; } #endif /* CONFIG_HIBERNATION */ -#endif +#endif /* CONFIG_DEBUG_PAGEALLOC */ #ifdef __HAVE_ARCH_GATE_AREA extern struct vm_area_struct *get_gate_vma(struct mm_struct *mm); -- 2.3.0 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org