]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
mm/hugetlb: add mmap() encodings for 32MB and 512MB page sizes
authorAnshuman Khandual <anshuman.khandual@arm.com>
Fri, 5 Oct 2018 22:51:54 +0000 (15:51 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Oct 2018 23:32:04 +0000 (16:32 -0700)
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>
include/uapi/asm-generic/hugetlb_encode.h
include/uapi/linux/memfd.h
include/uapi/linux/mman.h
include/uapi/linux/shm.h

index e4732d3c2998264857772faac64409c69ff8e43d..b0f8e87235bdf4b599b52895637d9bd6329887fa 100644 (file)
@@ -26,7 +26,9 @@
 #define HUGETLB_FLAG_ENCODE_2MB                (21 << HUGETLB_FLAG_ENCODE_SHIFT)
 #define HUGETLB_FLAG_ENCODE_8MB                (23 << HUGETLB_FLAG_ENCODE_SHIFT)
 #define HUGETLB_FLAG_ENCODE_16MB       (24 << HUGETLB_FLAG_ENCODE_SHIFT)
+#define HUGETLB_FLAG_ENCODE_32MB       (25 << HUGETLB_FLAG_ENCODE_SHIFT)
 #define HUGETLB_FLAG_ENCODE_256MB      (28 << HUGETLB_FLAG_ENCODE_SHIFT)
+#define HUGETLB_FLAG_ENCODE_512MB      (29 << HUGETLB_FLAG_ENCODE_SHIFT)
 #define HUGETLB_FLAG_ENCODE_1GB                (30 << HUGETLB_FLAG_ENCODE_SHIFT)
 #define HUGETLB_FLAG_ENCODE_2GB                (31 << HUGETLB_FLAG_ENCODE_SHIFT)
 #define HUGETLB_FLAG_ENCODE_16GB       (34 << HUGETLB_FLAG_ENCODE_SHIFT)
index 015a4c0bbb47d6e9cabc6aac2c254e8f6c7ee960..7a8a26751c2317ee30bf5f84e2be9fc977c9d2f9 100644 (file)
@@ -25,7 +25,9 @@
 #define MFD_HUGE_2MB   HUGETLB_FLAG_ENCODE_2MB
 #define MFD_HUGE_8MB   HUGETLB_FLAG_ENCODE_8MB
 #define MFD_HUGE_16MB  HUGETLB_FLAG_ENCODE_16MB
+#define MFD_HUGE_32MB  HUGETLB_FLAG_ENCODE_32MB
 #define MFD_HUGE_256MB HUGETLB_FLAG_ENCODE_256MB
+#define MFD_HUGE_512MB HUGETLB_FLAG_ENCODE_512MB
 #define MFD_HUGE_1GB   HUGETLB_FLAG_ENCODE_1GB
 #define MFD_HUGE_2GB   HUGETLB_FLAG_ENCODE_2GB
 #define MFD_HUGE_16GB  HUGETLB_FLAG_ENCODE_16GB
index bfd5938fede6c1ba3b71d096cd36127da2837042..d0f515d53299ea5784ffdb61dd1b829b04fd045c 100644 (file)
@@ -28,7 +28,9 @@
 #define MAP_HUGE_2MB   HUGETLB_FLAG_ENCODE_2MB
 #define MAP_HUGE_8MB   HUGETLB_FLAG_ENCODE_8MB
 #define MAP_HUGE_16MB  HUGETLB_FLAG_ENCODE_16MB
+#define MAP_HUGE_32MB  HUGETLB_FLAG_ENCODE_32MB
 #define MAP_HUGE_256MB HUGETLB_FLAG_ENCODE_256MB
+#define MAP_HUGE_512MB HUGETLB_FLAG_ENCODE_512MB
 #define MAP_HUGE_1GB   HUGETLB_FLAG_ENCODE_1GB
 #define MAP_HUGE_2GB   HUGETLB_FLAG_ENCODE_2GB
 #define MAP_HUGE_16GB  HUGETLB_FLAG_ENCODE_16GB
index dde1344f047cf04c541a21f4d983c9eb3c606ef5..6507ad0afc81d93713abee6f5790451dd4499d29 100644 (file)
@@ -65,7 +65,9 @@ struct shmid_ds {
 #define SHM_HUGE_2MB   HUGETLB_FLAG_ENCODE_2MB
 #define SHM_HUGE_8MB   HUGETLB_FLAG_ENCODE_8MB
 #define SHM_HUGE_16MB  HUGETLB_FLAG_ENCODE_16MB
+#define SHM_HUGE_32MB  HUGETLB_FLAG_ENCODE_32MB
 #define SHM_HUGE_256MB HUGETLB_FLAG_ENCODE_256MB
+#define SHM_HUGE_512MB HUGETLB_FLAG_ENCODE_512MB
 #define SHM_HUGE_1GB   HUGETLB_FLAG_ENCODE_1GB
 #define SHM_HUGE_2GB   HUGETLB_FLAG_ENCODE_2GB
 #define SHM_HUGE_16GB  HUGETLB_FLAG_ENCODE_16GB