These patches are the result of discussions in this thread [1]. The following changes are made in the patch set: 1) Put all the log2 encoded huge page size definitions in a common header file. The idea is have a set of definitions that can be use as the basis for system call specific definitions such as MAP_HUGE_* and SHM_HUGE_*. 2) Remove MAP_HUGE_* definitions in arch specific files. All these definitions are the same. Consolidate all definitions in the primary user header file (uapi/linux/mman.h). 3) Remove SHM_HUGE_* definitions intended for user space from kernel header file, and add to user (uapi/linux/shm.h) header file. Add definitions for all known huge page size encodings as in mmap. [1]https://lkml.org/lkml/2017/3/8/548 Mike Kravetz (3): mm:hugetlb: Define system call hugetlb size encodings in single file mm: arch: Consolidate mmap hugetlb size encodings mm:shm: Use new hugetlb size encoding definitions arch/alpha/include/uapi/asm/mman.h | 11 ---------- arch/mips/include/uapi/asm/mman.h | 11 ---------- arch/parisc/include/uapi/asm/mman.h | 11 ---------- arch/powerpc/include/uapi/asm/mman.h | 16 --------------- arch/x86/include/uapi/asm/mman.h | 3 --- arch/xtensa/include/uapi/asm/mman.h | 11 ---------- include/linux/shm.h | 17 ---------------- include/uapi/asm-generic/hugetlb_encode.h | 34 +++++++++++++++++++++++++++++++ include/uapi/asm-generic/mman-common.h | 11 ---------- include/uapi/linux/mman.h | 22 ++++++++++++++++++++ include/uapi/linux/shm.h | 31 ++++++++++++++++++++++++++-- 11 files changed, 85 insertions(+), 93 deletions(-) create mode 100644 include/uapi/asm-generic/hugetlb_encode.h -- 2.7.5