All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 043/119] mm/gup: make __gup_device_* require THP
@ 2017-09-06 23:20 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2017-09-06 23:20 UTC (permalink / raw)
  To: akpm, kirill.shutemov, mm-commits, oohall, torvalds

From: "Oliver O'Halloran" <oohall@gmail.com>
Subject: 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>
---

 mm/gup.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN mm/gup.c~mm-gup-make-__gup_device_-require-thp mm/gup.c
--- a/mm/gup.c~mm-gup-make-__gup_device_-require-thp
+++ a/mm/gup.c
@@ -1352,7 +1352,7 @@ static int gup_pte_range(pmd_t pmd, unsi
 }
 #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)
 {
_

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-09-06 23:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-06 23:20 [patch 043/119] mm/gup: make __gup_device_* require THP akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.