Skip to contentSkip to conversation

arch/powerpc/dax: Add MAP_SYNC mmap flag

PATCH New Aneesh Kumar K.V 1 participant 1 message Mar 15, 2019 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arch/powerpc/dax: Add MAP_SYNC mmap flag

This enables support for synchronous DAX fault on powerpc

The generic changes are added as part of
commit b6fb293f2497 ("mm: Define MAP_SYNC and VM_SYNC flags")

Without this, mmap returns EOPNOTSUPP for MAP_SYNC with MAP_SHARED_VALIDATE

Fixes b5beae5e224f ("powerpc/pseries: Add driver for PAPR SCM regions")
---
 arch/powerpc/include/uapi/asm/mman.h | 1 +
 1 file changed, 1 insertion(+)
arch/powerpc/include/uapi/asm/mman.h +1 -0
index 65065ce32814..e08cc5fc9d2f 100644
@@ -29,6 +29,7 @@
 #define MAP_NONBLOCK	0x10000		/* do not block on IO */
 #define MAP_STACK	0x20000		/* give out an address that is best suited for process/thread stacks */
 #define MAP_HUGETLB	0x40000		/* create a huge page mapping */
+#define MAP_SYNC	0x80000		/* perform synchronous page faults for the mapping */
 
 /* Override any generic PKEY permission defines */
 #define PKEY_DISABLE_EXECUTE   0x4
Signature · 1 line
2.20.1