0b26f7
commit 4ed990e5b97a61f29f929bdeb36c5b2abb547a64
0b26f7
Author: Joseph Myers <joseph@codesourcery.com>
0b26f7
Date:   Tue Sep 14 14:19:24 2021 +0000
0b26f7
0b26f7
    Add MADV_POPULATE_READ and MADV_POPULATE_WRITE from Linux 5.14 to bits/mman-linux.h
0b26f7
    
0b26f7
    Linux 5.14 adds constants MADV_POPULATE_READ and MADV_POPULATE_WRITE
0b26f7
    (with the same values on all architectures).  Add these to glibc's
0b26f7
    bits/mman-linux.h.
0b26f7
    
0b26f7
    Tested for x86_64.
0b26f7
    
0b26f7
    (cherry picked from commit 3561106278cddd2f007bd27fd4c3e90caaf14b43)
0b26f7
0b26f7
diff --git a/sysdeps/unix/sysv/linux/bits/mman-linux.h b/sysdeps/unix/sysv/linux/bits/mman-linux.h
0b26f7
index 3b1ae418e073c122..31451c28d93f9f72 100644
0b26f7
--- a/sysdeps/unix/sysv/linux/bits/mman-linux.h
0b26f7
+++ b/sysdeps/unix/sysv/linux/bits/mman-linux.h
0b26f7
@@ -89,6 +89,10 @@
0b26f7
 # define MADV_KEEPONFORK  19	/* Undo MADV_WIPEONFORK.  */
0b26f7
 # define MADV_COLD        20	/* Deactivate these pages.  */
0b26f7
 # define MADV_PAGEOUT     21	/* Reclaim these pages.  */
0b26f7
+# define MADV_POPULATE_READ 22	/* Populate (prefault) page tables
0b26f7
+				   readable.  */
0b26f7
+# define MADV_POPULATE_WRITE 23	/* Populate (prefault) page tables
0b26f7
+				   writable.  */
0b26f7
 # define MADV_HWPOISON	  100	/* Poison a page for testing.  */
0b26f7
 #endif
0b26f7