Skip to content

Commit 09180ca

Browse files
oohaltorvalds
authored andcommitted
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/[email protected] Signed-off-by: Oliver O'Halloran <[email protected]> Cc: Kirill A. Shutemov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent dba58d3 commit 09180ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/gup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1352,7 +1352,7 @@ static int gup_pte_range(pmd_t pmd, unsigned long addr, unsigned long end,
13521352
}
13531353
#endif /* __HAVE_ARCH_PTE_SPECIAL */
13541354

1355-
#ifdef __HAVE_ARCH_PTE_DEVMAP
1355+
#if defined(__HAVE_ARCH_PTE_DEVMAP) && defined(CONFIG_TRANSPARENT_HUGEPAGE)
13561356
static int __gup_device_huge(unsigned long pfn, unsigned long addr,
13571357
unsigned long end, struct page **pages, int *nr)
13581358
{

0 commit comments

Comments
 (0)