Update bits/mman.h constants and tst-mman-consts.py for Linux 5.3

Message ID alpine.DEB.2.21.1909242043320.14213@digraph.polyomino.org.uk
State Committed
Headers

Commit Message

Joseph Myers Sept. 24, 2019, 8:43 p.m. UTC
  The Linux 5.3 uapi headers have some rearrangement relating to MAP_*
constants, which includes the effect of adding definitions of MAP_SYNC
on powerpc and sparc.  This patch updates the corresponding glibc
bits/mman.h headers accordingly, and updates the Linux kernel version
number in tst-mman-consts.py to reflect that these constants are now
current with that kernel version.

Tested with build-many-glibcs.py.

2019-09-24  Joseph Myers  <joseph@codesourcery.com>

	* sysdeps/unix/sysv/linux/powerpc/bits/mman.h [__USE_MISC]
	(MAP_SYNC): New macro.
	* sysdeps/unix/sysv/linux/sparc/bits/mman.h [__USE_MISC]
	(MAP_SYNC): Likewise.
	* sysdeps/unix/sysv/linux/tst-mman-consts.py (main): Update Linux
	kernel version number to 5.3.
  

Comments

Joseph Myers Sept. 30, 2019, 3:32 p.m. UTC | #1
Ping.  This patch 
<https://sourceware.org/ml/libc-alpha/2019-09/msg00384.html> is pending 
review.
  
Andreas Schwab Sept. 30, 2019, 3:47 p.m. UTC | #2
On Sep 24 2019, Joseph Myers <joseph@codesourcery.com> wrote:

> 	* sysdeps/unix/sysv/linux/powerpc/bits/mman.h [__USE_MISC]
> 	(MAP_SYNC): New macro.
> 	* sysdeps/unix/sysv/linux/sparc/bits/mman.h [__USE_MISC]
> 	(MAP_SYNC): Likewise.
> 	* sysdeps/unix/sysv/linux/tst-mman-consts.py (main): Update Linux
> 	kernel version number to 5.3.

Ok.

Andreas.
  

Patch

diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/mman.h b/sysdeps/unix/sysv/linux/powerpc/bits/mman.h
index 198600e34b..db850f1ea4 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/mman.h
@@ -36,6 +36,8 @@ 
 # define MAP_NONBLOCK	0x10000		/* Do not block on IO.  */
 # define MAP_STACK	0x20000		/* Allocation is for a stack.  */
 # define MAP_HUGETLB	0x40000		/* Create huge page mapping.  */
+# define MAP_SYNC	0x80000		/* Perform synchronous page
+					   faults for the mapping.  */
 # define MAP_FIXED_NOREPLACE 0x100000	/* MAP_FIXED but do not unmap
 					   underlying mapping.  */
 #endif
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/mman.h b/sysdeps/unix/sysv/linux/sparc/bits/mman.h
index 732289bd4e..9eb83dcf3f 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/mman.h
@@ -36,6 +36,8 @@ 
 # define MAP_NONBLOCK	0x10000		/* Do not block on IO.  */
 # define MAP_STACK	0x20000		/* Allocation is for a stack.  */
 # define MAP_HUGETLB	0x40000		/* Create huge page mapping.  */
+# define MAP_SYNC	0x80000		/* Perform synchronous page
+					   faults for the mapping.  */
 # define MAP_FIXED_NOREPLACE 0x100000	/* MAP_FIXED but do not unmap
 					   underlying mapping.  */
 #endif
diff --git a/sysdeps/unix/sysv/linux/tst-mman-consts.py b/sysdeps/unix/sysv/linux/tst-mman-consts.py
index ea88888405..c11e2ea4ac 100644
--- a/sysdeps/unix/sysv/linux/tst-mman-consts.py
+++ b/sysdeps/unix/sysv/linux/tst-mman-consts.py
@@ -41,7 +41,7 @@  def main():
                         help='C compiler (including options) to use')
     args = parser.parse_args()
     linux_version_headers = linux_kernel_version(args.cc)
-    linux_version_glibc = (5, 2)
+    linux_version_glibc = (5, 3)
     sys.exit(glibcextract.compare_macro_consts(
         '#define _GNU_SOURCE 1\n'
         '#include <sys/mman.h>\n',