summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2017-08-02 10:37:33 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2017-08-02 10:37:33 +1000
commit74affe9e243473a30f0aa1bb2e1a554c7bada3e8 (patch)
tree59b0aaf236ec19b88246a172539acee7bb8be69d /mm
parent0c19b34f9dd3f36276e907fb31d5ae9164f1a3a1 (diff)
mm/gup: make __gup_device_* require THP
These functions are the only bits of generic code that use {pud,pmd}_pfn() without checking for CONFIG_TRANSPARENT_HUGEPAGE. This works fine on x86, the only arch with devmap support, since the *_pfn() functions are always defined there, but this isn't true for every architecture. Link: http://lkml.kernel.org/r/20170626063833.11094-1-oohall@gmail.com Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'mm')
-rw-r--r--mm/gup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/gup.c b/mm/gup.c
index d81dd886d5d9..76fd199aaae2 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -1370,7 +1370,7 @@ static int gup_pte_range(pmd_t pmd, unsigned long addr, unsigned long end,
}
#endif /* __HAVE_ARCH_PTE_SPECIAL */
-#ifdef __HAVE_ARCH_PTE_DEVMAP
+#if defined(__HAVE_ARCH_PTE_DEVMAP) && defined(CONFIG_TRANSPARENT_HUGEPAGE)
static int __gup_device_huge(unsigned long pfn, unsigned long addr,
unsigned long end, struct page **pages, int *nr)
{