Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932540AbeAKIyS (ORCPT + 1 other); Thu, 11 Jan 2018 03:54:18 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:35932 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932102AbeAKIyR (ORCPT ); Thu, 11 Jan 2018 03:54:17 -0500 X-Originating-IP: 92.154.27.243 From: Alexandre Ghiti To: linux-mm@kvack.org Cc: akpm@linux-foundation.org, kirill.shutemov@linux.intel.com, mhocko@suse.com, dan.j.williams@intel.com, zi.yan@cs.rutgers.edu, gregkh@linuxfoundation.org, n-horiguchi@ah.jp.nec.com, willy@linux.intel.com, mark.rutland@arm.com, linux-kernel@vger.kernel.org, Alexandre Ghiti Subject: [PATCH] mm, THP: vmf_insert_pfn_pud depends on CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD Date: Thu, 11 Jan 2018 09:53:31 +0100 Message-Id: <1515660811-12293-1-git-send-email-aghiti@upmem.com> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: The only definition of vmf_insert_pfn_pud depends on CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD being defined. Then its declaration in include/linux/huge_mm.h should have the same restriction so that we do not expose this function if CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD is not defined. Signed-off-by: Alexandre Ghiti --- include/linux/huge_mm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h index a8a1262..11794f6a 100644 --- a/include/linux/huge_mm.h +++ b/include/linux/huge_mm.h @@ -48,8 +48,10 @@ extern int change_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd, int prot_numa); int vmf_insert_pfn_pmd(struct vm_area_struct *vma, unsigned long addr, pmd_t *pmd, pfn_t pfn, bool write); +#ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD int vmf_insert_pfn_pud(struct vm_area_struct *vma, unsigned long addr, pud_t *pud, pfn_t pfn, bool write); +#endif enum transparent_hugepage_flag { TRANSPARENT_HUGEPAGE_FLAG, TRANSPARENT_HUGEPAGE_REQ_MADV_FLAG, -- 2.1.4