Merge tag 'libnvdimm-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdim...
[platform/kernel/linux-rpi.git] / include / linux / mm.h
index c7b1d61..ee07314 100644 (file)
@@ -199,6 +199,7 @@ extern unsigned int kobjsize(const void *objp);
 #define VM_ACCOUNT     0x00100000      /* Is a VM accounted object */
 #define VM_NORESERVE   0x00200000      /* should the VM suppress accounting */
 #define VM_HUGETLB     0x00400000      /* Huge TLB Page VM */
+#define VM_SYNC                0x00800000      /* Synchronous page faults */
 #define VM_ARCH_1      0x01000000      /* Architecture-specific flag */
 #define VM_WIPEONFORK  0x02000000      /* Wipe VMA contents in child. */
 #define VM_DONTDUMP    0x04000000      /* Do not include in the core dump */
@@ -1191,8 +1192,9 @@ static inline void clear_page_pfmemalloc(struct page *page)
 #define VM_FAULT_RETRY 0x0400  /* ->fault blocked, must retry */
 #define VM_FAULT_FALLBACK 0x0800       /* huge page fault failed, fall back to small */
 #define VM_FAULT_DONE_COW   0x1000     /* ->fault has fully handled COW */
-
-#define VM_FAULT_HWPOISON_LARGE_MASK 0xf000 /* encodes hpage index for large hwpoison */
+#define VM_FAULT_NEEDDSYNC  0x2000     /* ->fault did not modify page tables
+                                        * and needs fsync() to complete (for
+                                        * synchronous page faults in DAX) */
 
 #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV | \
                         VM_FAULT_HWPOISON | VM_FAULT_HWPOISON_LARGE | \
@@ -1210,7 +1212,8 @@ static inline void clear_page_pfmemalloc(struct page *page)
        { VM_FAULT_LOCKED,              "LOCKED" }, \
        { VM_FAULT_RETRY,               "RETRY" }, \
        { VM_FAULT_FALLBACK,            "FALLBACK" }, \
-       { VM_FAULT_DONE_COW,            "DONE_COW" }
+       { VM_FAULT_DONE_COW,            "DONE_COW" }, \
+       { VM_FAULT_NEEDDSYNC,           "NEEDDSYNC" }
 
 /* Encode hstate index for a hwpoisoned large page */
 #define VM_FAULT_SET_HINDEX(x) ((x) << 12)