thp: rewrite freeze_page()/unfreeze_page() with generic rmap walkers
[cascardo/linux.git] / include / linux / huge_mm.h
index 01ad22e..5307dfb 100644 (file)
@@ -96,18 +96,20 @@ static inline int split_huge_page(struct page *page)
 void deferred_split_huge_page(struct page *page);
 
 void __split_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd,
-               unsigned long address);
+               unsigned long address, bool freeze);
 
 #define split_huge_pmd(__vma, __pmd, __address)                                \
        do {                                                            \
                pmd_t *____pmd = (__pmd);                               \
                if (pmd_trans_huge(*____pmd)                            \
                                        || pmd_devmap(*____pmd))        \
-                       __split_huge_pmd(__vma, __pmd, __address);      \
+                       __split_huge_pmd(__vma, __pmd, __address,       \
+                                               false);                 \
        }  while (0)
 
 
-void split_huge_pmd_address(struct vm_area_struct *vma, unsigned long address);
+void split_huge_pmd_address(struct vm_area_struct *vma, unsigned long address,
+               bool freeze, struct page *page);
 
 #if HPAGE_PMD_ORDER >= MAX_ORDER
 #error "hugepages can't be allocated by the buddy allocator"
@@ -178,7 +180,7 @@ static inline void deferred_split_huge_page(struct page *page) {}
        do { } while (0)
 
 static inline void split_huge_pmd_address(struct vm_area_struct *vma,
-               unsigned long address) {}
+               unsigned long address, bool freeze, struct page *page) {}
 
 static inline int hugepage_madvise(struct vm_area_struct *vma,
                                   unsigned long *vm_flags, int advice)