8 #include <linux/sched.h>
13 #include <asm/pgtable.h>
42 if ((
pte_val(pte) & mask) != result)
52 head = compound_head(page);
53 if (!page_cache_get_speculative(head))
60 get_huge_page_tail(page);
64 }
while (ptep++, addr +=
PAGE_SIZE, addr != end);
69 static int gup_pmd_range(
pud_t pud,
unsigned long addr,
unsigned long end,
70 int write,
struct page **pages,
int *nr)
82 if (!gup_pte_range(pmd, addr, next, write, pages, nr))
84 }
while (pmdp++, addr = next, addr != end);
89 static int gup_pud_range(
pgd_t pgd,
unsigned long addr,
unsigned long end,
90 int write,
struct page **pages,
int *nr)
102 if (!gup_pmd_range(pud, addr, next, write, pages, nr))
104 }
while (pudp++, addr = next, addr != end);
146 next = pgd_addr_end(addr, end);
149 if (!gup_pud_range(pgd, addr, next, write, pages, &nr))
151 }
while (pgdp++, addr = next, addr != end);
170 (end - start) >> PAGE_SHIFT, write, 0, pages,
NULL);