This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
[ARM,MIPS,M68K] Add new MADV_* values
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: libc-ports at sourceware dot org
- Cc: aurelien at aurel32 dot net
- Date: Tue, 17 Nov 2009 20:53:45 +0000 (UTC)
- Subject: [ARM,MIPS,M68K] Add new MADV_* values
This patch, corresponding to a recent libc change, adds new MADV_*
definitions for ARM, MIPS and M68K. I've committed the ARM and MIPS
changes; OK to commit the M68K ones?
Notes:
* ARM and M68K use asm-generic/mman-common.h, so they have the generic
values. MIPS has its own asm/mman.h that doesn't include
asm-generic/mman-common.h and doesn't define MADV_HWPOISON; I'm presuming
this lack of MADV_HWPOISON is an oversight and have added that definition
for MIPS, but have queried this on linux-mips. MIPS does use the same
values as the generic header for the other two new macros.
* I did not use Aurelien's patch from bug 10972, but instead followed the
libc changes as closely as possible. Apart from the libc change also
defining MADV_HWPOISON, it appears the ports patch in that bug is
incorrect for hppa at least (that uses different values, but the patch
adds the generic values there). So alpha and hppa will need updating
separately (with patches adding the same set of macros as for the other
architectures, with the right values for those architectures).
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 068ce75..a95704b 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,9 @@
+2009-11-17 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #10972]
+ * sysdeps/unix/sysv/linux/arm/bits/mman.h: Add new MADV_*
+ constants from recent kernels.
+
2009-11-14 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/bits/fcntl.h (F_SETOWN_EX,
diff --git a/ChangeLog.m68k b/ChangeLog.m68k
index 4dc4f41..7a3e8b7 100644
--- a/ChangeLog.m68k
+++ b/ChangeLog.m68k
@@ -1,3 +1,9 @@
+2009-11-17 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #10972]
+ * sysdeps/unix/sysv/linux/m68k/bits/mman.h: Add new MADV_*
+ constants from recent kernels.
+
2009-11-15 Andreas Schwab <schwab@linux-m68k.org>
* sysdeps/m68k/libgcc_s.h: New file.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 0f17f52..f455724 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,5 +1,11 @@
2009-11-17 Joseph Myers <joseph@codesourcery.com>
+ [BZ #10972]
+ * sysdeps/unix/sysv/linux/mips/bits/mman.h: Add new MADV_*
+ constants from recent kernels.
+
+2009-11-17 Joseph Myers <joseph@codesourcery.com>
+
* sysdeps/unix/sysv/linux/mips/bits/errno.h (ERFKILL): Define if
not already defined.
diff --git a/sysdeps/unix/sysv/linux/arm/bits/mman.h b/sysdeps/unix/sysv/linux/arm/bits/mman.h
index 828ec94..0240aed 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/mman.h
@@ -1,5 +1,6 @@
/* Definitions for POSIX memory map interface. Linux/ARM version.
- Copyright (C) 1997, 2000, 2003, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000, 2003, 2005, 2006, 2009
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -83,14 +84,17 @@
/* Advice to `madvise'. */
#ifdef __USE_BSD
-# define MADV_NORMAL 0 /* No further special treatment. */
-# define MADV_RANDOM 1 /* Expect random page references. */
-# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define MADV_WILLNEED 3 /* Will need these pages. */
-# define MADV_DONTNEED 4 /* Don't need these pages. */
-# define MADV_REMOVE 9 /* Remove these pages and resources. */
-# define MADV_DONTFORK 10 /* Do not inherit across fork. */
-# define MADV_DOFORK 11 /* Do inherit across fork. */
+# define MADV_NORMAL 0 /* No further special treatment. */
+# define MADV_RANDOM 1 /* Expect random page references. */
+# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define MADV_WILLNEED 3 /* Will need these pages. */
+# define MADV_DONTNEED 4 /* Don't need these pages. */
+# define MADV_REMOVE 9 /* Remove these pages and resources. */
+# define MADV_DONTFORK 10 /* Do not inherit across fork. */
+# define MADV_DOFORK 11 /* Do inherit across fork. */
+# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */
+# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
+# define MADV_HWPOISON 100 /* Poison a page for testing. */
#endif
/* The POSIX people had to invent similar names for the same things. */
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h
index ab99176..15727ad 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h
@@ -1,5 +1,6 @@
/* Definitions for POSIX memory map interface. Linux/m68k version.
- Copyright (C) 1997, 2000, 2003, 2005, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000, 2003, 2005, 2008, 2009
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -83,14 +84,17 @@
/* Advice to `madvise'. */
#ifdef __USE_BSD
-# define MADV_NORMAL 0 /* No further special treatment. */
-# define MADV_RANDOM 1 /* Expect random page references. */
-# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define MADV_WILLNEED 3 /* Will need these pages. */
-# define MADV_DONTNEED 4 /* Don't need these pages. */
-# define MADV_REMOVE 9 /* Remove these pages and resources. */
-# define MADV_DONTFORK 10 /* Do not inherit across fork. */
-# define MADV_DOFORK 11 /* Do inherit across fork. */
+# define MADV_NORMAL 0 /* No further special treatment. */
+# define MADV_RANDOM 1 /* Expect random page references. */
+# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define MADV_WILLNEED 3 /* Will need these pages. */
+# define MADV_DONTNEED 4 /* Don't need these pages. */
+# define MADV_REMOVE 9 /* Remove these pages and resources. */
+# define MADV_DONTFORK 10 /* Do not inherit across fork. */
+# define MADV_DOFORK 11 /* Do inherit across fork. */
+# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */
+# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
+# define MADV_HWPOISON 100 /* Poison a page for testing. */
#endif
/* The POSIX people had to invent similar names for the same things. */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h
index 47d3393..f639e04 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/MIPS version.
- Copyright (C) 1997, 2000, 2003, 2004, 2005, 2006
+ Copyright (C) 1997, 2000, 2003, 2004, 2005, 2006, 2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -86,14 +86,17 @@
/* Advice to `madvise'. */
#ifdef __USE_BSD
-# define MADV_NORMAL 0 /* No further special treatment. */
-# define MADV_RANDOM 1 /* Expect random page references. */
-# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define MADV_WILLNEED 3 /* Will need these pages. */
-# define MADV_DONTNEED 4 /* Don't need these pages. */
-# define MADV_REMOVE 9 /* Remove these pages and resources. */
-# define MADV_DONTFORK 10 /* Do not inherit across fork. */
-# define MADV_DOFORK 11 /* Do inherit across fork. */
+# define MADV_NORMAL 0 /* No further special treatment. */
+# define MADV_RANDOM 1 /* Expect random page references. */
+# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define MADV_WILLNEED 3 /* Will need these pages. */
+# define MADV_DONTNEED 4 /* Don't need these pages. */
+# define MADV_REMOVE 9 /* Remove these pages and resources. */
+# define MADV_DONTFORK 10 /* Do not inherit across fork. */
+# define MADV_DOFORK 11 /* Do inherit across fork. */
+# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */
+# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
+# define MADV_HWPOISON 100 /* Poison a page for testing. */
#endif
/* The POSIX people had to invent similar names for the same things. */
--
Joseph S. Myers
joseph@codesourcery.com