mm: support more pagesizes for MAP_HUGETLB/SHM_HUGETLB
[firefly-linux-kernel-4.4.55.git] / include / uapi / asm-generic / mman-common.h
index d030d2c2647ae513854d9795f2e84e1793811602..4164529a94f9f1529ac55c012d1d58d4a2dd6c2f 100644 (file)
 /* compatibility flags */
 #define MAP_FILE       0
 
+/*
+ * When MAP_HUGETLB is set bits [26:31] encode the log2 of the huge page size.
+ * This gives us 6 bits, which is enough until someone invents 128 bit address
+ * spaces.
+ *
+ * Assume these are all power of twos.
+ * When 0 use the default page size.
+ */
+#define MAP_HUGE_SHIFT 26
+#define MAP_HUGE_MASK  0x3f
+
 #endif /* __ASM_GENERIC_MMAN_COMMON_H */