idr: implement idr_preload[_end]() and idr_alloc()
[firefly-linux-kernel-4.4.55.git] / include / linux / mm.h
index 87b0ef25360752b6639eb72db0fe1a46f3627ea4..e7c3f9a0111aa3b2fcb7b145477709208d668bcc 100644 (file)
@@ -1629,8 +1629,17 @@ int vm_insert_pfn(struct vm_area_struct *vma, unsigned long addr,
 int vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr,
                        unsigned long pfn);
 
-struct page *follow_page(struct vm_area_struct *, unsigned long address,
-                       unsigned int foll_flags);
+struct page *follow_page_mask(struct vm_area_struct *vma,
+                             unsigned long address, unsigned int foll_flags,
+                             unsigned int *page_mask);
+
+static inline struct page *follow_page(struct vm_area_struct *vma,
+               unsigned long address, unsigned int foll_flags)
+{
+       unsigned int unused_page_mask;
+       return follow_page_mask(vma, address, foll_flags, &unused_page_mask);
+}
+
 #define FOLL_WRITE     0x01    /* check pte is writable */
 #define FOLL_TOUCH     0x02    /* mark page accessed */
 #define FOLL_GET       0x04    /* do get_page on page */
@@ -1642,6 +1651,7 @@ struct page *follow_page(struct vm_area_struct *, unsigned long address,
 #define FOLL_SPLIT     0x80    /* don't return transhuge pages, split them */
 #define FOLL_HWPOISON  0x100   /* check page is hwpoisoned */
 #define FOLL_NUMA      0x200   /* force NUMA hinting page fault */
+#define FOLL_MIGRATION 0x400   /* wait for page to replace migration entry */
 
 typedef int (*pte_fn_t)(pte_t *pte, pgtable_t token, unsigned long addr,
                        void *data);