dt-bindings: Drop Beniamin Bia and Stefan Popa
[linux-2.6-microblaze.git] / mm / internal.h
index ddd2d6a..7854098 100644 (file)
@@ -853,6 +853,7 @@ int numa_migrate_prep(struct page *page, struct vm_area_struct *vma,
                      unsigned long addr, int page_nid, int *flags);
 
 void free_zone_device_page(struct page *page);
+int migrate_device_coherent_page(struct page *page);
 
 /*
  * mm/gup.c
@@ -863,4 +864,22 @@ DECLARE_PER_CPU(struct per_cpu_nodestat, boot_nodestats);
 
 extern bool mirrored_kernelcore;
 
+static inline bool vma_soft_dirty_enabled(struct vm_area_struct *vma)
+{
+       /*
+        * NOTE: we must check this before VM_SOFTDIRTY on soft-dirty
+        * enablements, because when without soft-dirty being compiled in,
+        * VM_SOFTDIRTY is defined as 0x0, then !(vm_flags & VM_SOFTDIRTY)
+        * will be constantly true.
+        */
+       if (!IS_ENABLED(CONFIG_MEM_SOFT_DIRTY))
+               return false;
+
+       /*
+        * Soft-dirty is kind of special: its tracking is enabled when the
+        * vma flags not set.
+        */
+       return !(vma->vm_flags & VM_SOFTDIRTY);
+}
+
 #endif /* __MM_INTERNAL_H */