aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnshuman Khandual <anshuman.khandual@arm.com>2018-10-05 18:51:54 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-05 19:32:04 -0400
commit20916d4636a9b3c1bf562b305f91d126771edaf9 (patch)
tree62f074f581ff5129f89e38371dbffe121d200f7e
parente6112fc300702f96374f34368513d57795fc6d23 (diff)
mm/hugetlb: add mmap() encodings for 32MB and 512MB page sizes
ARM64 architecture also supports 32MB and 512MB HugeTLB page sizes. This just adds mmap() system call argument encoding for them. Link: http://lkml.kernel.org/r/1537841300-6979-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> Acked-by: Punit Agrawal <punit.agrawal@arm.com> Acked-by: Mike Kravetz <mike.kravetz@oracle.com> Cc: Michal Hocko <mhocko@kernel.org> Cc: Will Deacon <will.deacon@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--include/uapi/asm-generic/hugetlb_encode.h2
-rw-r--r--include/uapi/linux/memfd.h2
-rw-r--r--include/uapi/linux/mman.h2
-rw-r--r--include/uapi/linux/shm.h2
4 files changed, 8 insertions, 0 deletions
diff --git a/include/uapi/asm-generic/hugetlb_encode.h b/include/uapi/asm-generic/hugetlb_encode.h
index e4732d3c2998..b0f8e87235bd 100644
--- a/include/uapi/asm-generic/hugetlb_encode.h
+++ b/include/uapi/asm-generic/hugetlb_encode.h
@@ -26,7 +26,9 @@
26#define HUGETLB_FLAG_ENCODE_2MB (21 << HUGETLB_FLAG_ENCODE_SHIFT) 26#define HUGETLB_FLAG_ENCODE_2MB (21 << HUGETLB_FLAG_ENCODE_SHIFT)
27#define HUGETLB_FLAG_ENCODE_8MB (23 << HUGETLB_FLAG_ENCODE_SHIFT) 27#define HUGETLB_FLAG_ENCODE_8MB (23 << HUGETLB_FLAG_ENCODE_SHIFT)
28#define HUGETLB_FLAG_ENCODE_16MB (24 << HUGETLB_FLAG_ENCODE_SHIFT) 28#define HUGETLB_FLAG_ENCODE_16MB (24 << HUGETLB_FLAG_ENCODE_SHIFT)
29#define HUGETLB_FLAG_ENCODE_32MB (25 << HUGETLB_FLAG_ENCODE_SHIFT)
29#define HUGETLB_FLAG_ENCODE_256MB (28 << HUGETLB_FLAG_ENCODE_SHIFT) 30#define HUGETLB_FLAG_ENCODE_256MB (28 << HUGETLB_FLAG_ENCODE_SHIFT)
31#define HUGETLB_FLAG_ENCODE_512MB (29 << HUGETLB_FLAG_ENCODE_SHIFT)
30#define HUGETLB_FLAG_ENCODE_1GB (30 << HUGETLB_FLAG_ENCODE_SHIFT) 32#define HUGETLB_FLAG_ENCODE_1GB (30 << HUGETLB_FLAG_ENCODE_SHIFT)
31#define HUGETLB_FLAG_ENCODE_2GB (31 << HUGETLB_FLAG_ENCODE_SHIFT) 33#define HUGETLB_FLAG_ENCODE_2GB (31 << HUGETLB_FLAG_ENCODE_SHIFT)
32#define HUGETLB_FLAG_ENCODE_16GB (34 << HUGETLB_FLAG_ENCODE_SHIFT) 34#define HUGETLB_FLAG_ENCODE_16GB (34 << HUGETLB_FLAG_ENCODE_SHIFT)
diff --git a/include/uapi/linux/memfd.h b/include/uapi/linux/memfd.h
index 015a4c0bbb47..7a8a26751c23 100644
--- a/include/uapi/linux/memfd.h
+++ b/include/uapi/linux/memfd.h
@@ -25,7 +25,9 @@
25#define MFD_HUGE_2MB HUGETLB_FLAG_ENCODE_2MB 25#define MFD_HUGE_2MB HUGETLB_FLAG_ENCODE_2MB
26#define MFD_HUGE_8MB HUGETLB_FLAG_ENCODE_8MB 26#define MFD_HUGE_8MB HUGETLB_FLAG_ENCODE_8MB
27#define MFD_HUGE_16MB HUGETLB_FLAG_ENCODE_16MB 27#define MFD_HUGE_16MB HUGETLB_FLAG_ENCODE_16MB
28#define MFD_HUGE_32MB HUGETLB_FLAG_ENCODE_32MB
28#define MFD_HUGE_256MB HUGETLB_FLAG_ENCODE_256MB 29#define MFD_HUGE_256MB HUGETLB_FLAG_ENCODE_256MB
30#define MFD_HUGE_512MB HUGETLB_FLAG_ENCODE_512MB
29#define MFD_HUGE_1GB HUGETLB_FLAG_ENCODE_1GB 31#define MFD_HUGE_1GB HUGETLB_FLAG_ENCODE_1GB
30#define MFD_HUGE_2GB HUGETLB_FLAG_ENCODE_2GB 32#define MFD_HUGE_2GB HUGETLB_FLAG_ENCODE_2GB
31#define MFD_HUGE_16GB HUGETLB_FLAG_ENCODE_16GB 33#define MFD_HUGE_16GB HUGETLB_FLAG_ENCODE_16GB
diff --git a/include/uapi/linux/mman.h b/include/uapi/linux/mman.h
index bfd5938fede6..d0f515d53299 100644
--- a/include/uapi/linux/mman.h
+++ b/include/uapi/linux/mman.h
@@ -28,7 +28,9 @@
28#define MAP_HUGE_2MB HUGETLB_FLAG_ENCODE_2MB 28#define MAP_HUGE_2MB HUGETLB_FLAG_ENCODE_2MB
29#define MAP_HUGE_8MB HUGETLB_FLAG_ENCODE_8MB 29#define MAP_HUGE_8MB HUGETLB_FLAG_ENCODE_8MB
30#define MAP_HUGE_16MB HUGETLB_FLAG_ENCODE_16MB 30#define MAP_HUGE_16MB HUGETLB_FLAG_ENCODE_16MB
31#define MAP_HUGE_32MB HUGETLB_FLAG_ENCODE_32MB
31#define MAP_HUGE_256MB HUGETLB_FLAG_ENCODE_256MB 32#define MAP_HUGE_256MB HUGETLB_FLAG_ENCODE_256MB
33#define MAP_HUGE_512MB HUGETLB_FLAG_ENCODE_512MB
32#define MAP_HUGE_1GB HUGETLB_FLAG_ENCODE_1GB 34#define MAP_HUGE_1GB HUGETLB_FLAG_ENCODE_1GB
33#define MAP_HUGE_2GB HUGETLB_FLAG_ENCODE_2GB 35#define MAP_HUGE_2GB HUGETLB_FLAG_ENCODE_2GB
34#define MAP_HUGE_16GB HUGETLB_FLAG_ENCODE_16GB 36#define MAP_HUGE_16GB HUGETLB_FLAG_ENCODE_16GB
diff --git a/include/uapi/linux/shm.h b/include/uapi/linux/shm.h
index dde1344f047c..6507ad0afc81 100644
--- a/include/uapi/linux/shm.h
+++ b/include/uapi/linux/shm.h
@@ -65,7 +65,9 @@ struct shmid_ds {
65#define SHM_HUGE_2MB HUGETLB_FLAG_ENCODE_2MB 65#define SHM_HUGE_2MB HUGETLB_FLAG_ENCODE_2MB
66#define SHM_HUGE_8MB HUGETLB_FLAG_ENCODE_8MB 66#define SHM_HUGE_8MB HUGETLB_FLAG_ENCODE_8MB
67#define SHM_HUGE_16MB HUGETLB_FLAG_ENCODE_16MB 67#define SHM_HUGE_16MB HUGETLB_FLAG_ENCODE_16MB
68#define SHM_HUGE_32MB HUGETLB_FLAG_ENCODE_32MB
68#define SHM_HUGE_256MB HUGETLB_FLAG_ENCODE_256MB 69#define SHM_HUGE_256MB HUGETLB_FLAG_ENCODE_256MB
70#define SHM_HUGE_512MB HUGETLB_FLAG_ENCODE_512MB
69#define SHM_HUGE_1GB HUGETLB_FLAG_ENCODE_1GB 71#define SHM_HUGE_1GB HUGETLB_FLAG_ENCODE_1GB
70#define SHM_HUGE_2GB HUGETLB_FLAG_ENCODE_2GB 72#define SHM_HUGE_2GB HUGETLB_FLAG_ENCODE_2GB
71#define SHM_HUGE_16GB HUGETLB_FLAG_ENCODE_16GB 73#define SHM_HUGE_16GB HUGETLB_FLAG_ENCODE_16GB