* [PATCH 4/6] Use bits/mman-linux.h for M68K
2013-03-05 19:53 [PATCH 0/6] Use common <bits/mman-linux.h> for various ports Andreas Jaeger
` (2 preceding siblings ...)
2013-03-05 19:37 ` [PATCH 2/6] Use bits/mman-linux.h for ARM Andreas Jaeger
@ 2013-03-05 19:37 ` Andreas Jaeger
2013-03-05 22:55 ` Andreas Schwab
2013-03-05 19:37 ` [PATCH 6/6] Use bits/mman-linux.h for TILE Andreas Jaeger
2013-03-05 19:53 ` [PATCH 5/6] Use bits/mman-linux.h for MIPS Andreas Jaeger
5 siblings, 1 reply; 20+ messages in thread
From: Andreas Jaeger @ 2013-03-05 19:37 UTC (permalink / raw)
To: libc-ports
---
ports/sysdeps/unix/sysv/linux/m68k/bits/mman.h | 76 +-------------------------
1 file changed, 2 insertions(+), 74 deletions(-)
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/ports/sysdeps/unix/sysv/linux/m68k/bits/mman.h
index d2fb69d..b89011a 100644
--- a/ports/sysdeps/unix/sysv/linux/m68k/bits/mman.h
+++ b/ports/sysdeps/unix/sysv/linux/m68k/bits/mman.h
@@ -23,36 +23,6 @@
/* The following definitions basically come from the kernel headers.
But the kernel header is not namespace clean. */
-
-/* Protections are chosen from these bits, OR'd together. The
- implementation does not necessarily support PROT_EXEC or PROT_WRITE
- without PROT_READ. The only guarantees are that no writing will be
- allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
-
-#define PROT_READ 0x1 /* Page can be read. */
-#define PROT_WRITE 0x2 /* Page can be written. */
-#define PROT_EXEC 0x4 /* Page can be executed. */
-#define PROT_NONE 0x0 /* Page can not be accessed. */
-#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of
- growsdown vma (mprotect only). */
-#define PROT_GROWSUP 0x02000000 /* Extend change to start of
- growsup vma (mprotect only). */
-
-/* Sharing types (must choose one and only one of these). */
-#define MAP_SHARED 0x01 /* Share changes. */
-#define MAP_PRIVATE 0x02 /* Changes are private. */
-#ifdef __USE_MISC
-# define MAP_TYPE 0x0f /* Mask for type of mapping. */
-#endif
-
-/* Other flags. */
-#define MAP_FIXED 0x10 /* Interpret addr exactly. */
-#ifdef __USE_MISC
-# define MAP_FILE 0
-# define MAP_ANONYMOUS 0x20 /* Don't use a file. */
-# define MAP_ANON MAP_ANONYMOUS
-#endif
-
/* These are Linux-specific. */
#ifdef __USE_MISC
# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */
@@ -66,47 +36,5 @@
# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
#endif
-/* Flags to `msync'. */
-#define MS_ASYNC 1 /* Sync memory asynchronously. */
-#define MS_SYNC 4 /* Synchronous memory sync. */
-#define MS_INVALIDATE 2 /* Invalidate the caches. */
-
-/* Flags for `mlockall'. */
-#define MCL_CURRENT 1 /* Lock all currently mapped pages. */
-#define MCL_FUTURE 2 /* Lock all additions to address
- space. */
-
-/* Flags for `mremap'. */
-#ifdef __USE_GNU
-# define MREMAP_MAYMOVE 1
-# define MREMAP_FIXED 2
-#endif
-
-/* 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_MERGEABLE 12 /* KSM may merge identical pages. */
-# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
-# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */
-# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */
-# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump,
- overrides the coredump filter bits. */
-# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */
-# define MADV_HWPOISON 100 /* Poison a page for testing. */
-#endif
-
-/* The POSIX people had to invent similar names for the same things. */
-#ifdef __USE_XOPEN2K
-# define POSIX_MADV_NORMAL 0 /* No further special treatment. */
-# define POSIX_MADV_RANDOM 1 /* Expect random page references. */
-# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */
-# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */
-#endif
+/* Include generic Linux declarations. */
+#include <bits/mman-linux.h>
--
1.8.1.4
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 2/6] Use bits/mman-linux.h for ARM
2013-03-05 19:53 [PATCH 0/6] Use common <bits/mman-linux.h> for various ports Andreas Jaeger
2013-03-05 19:37 ` [PATCH 1/6] Use bits/mman-linux.h for AM33 Andreas Jaeger
2013-03-05 19:37 ` [PATCH 3/6] Use bits/mman-linux.h for IA64 Andreas Jaeger
@ 2013-03-05 19:37 ` Andreas Jaeger
2013-03-05 23:36 ` Joseph S. Myers
2013-03-05 19:37 ` [PATCH 4/6] Use bits/mman-linux.h for M68K Andreas Jaeger
` (2 subsequent siblings)
5 siblings, 1 reply; 20+ messages in thread
From: Andreas Jaeger @ 2013-03-05 19:37 UTC (permalink / raw)
To: libc-ports
---
ports/sysdeps/unix/sysv/linux/arm/bits/mman.h | 76 +--------------------------
1 file changed, 2 insertions(+), 74 deletions(-)
diff --git a/ports/sysdeps/unix/sysv/linux/arm/bits/mman.h b/ports/sysdeps/unix/sysv/linux/arm/bits/mman.h
index f5ca3c9..11ecbca 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/bits/mman.h
+++ b/ports/sysdeps/unix/sysv/linux/arm/bits/mman.h
@@ -23,36 +23,6 @@
/* The following definitions basically come from the kernel headers.
But the kernel header is not namespace clean. */
-
-/* Protections are chosen from these bits, OR'd together. The
- implementation does not necessarily support PROT_EXEC or PROT_WRITE
- without PROT_READ. The only guarantees are that no writing will be
- allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
-
-#define PROT_READ 0x1 /* Page can be read. */
-#define PROT_WRITE 0x2 /* Page can be written. */
-#define PROT_EXEC 0x4 /* Page can be executed. */
-#define PROT_NONE 0x0 /* Page can not be accessed. */
-#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of
- growsdown vma (mprotect only). */
-#define PROT_GROWSUP 0x02000000 /* Extend change to start of
- growsup vma (mprotect only). */
-
-/* Sharing types (must choose one and only one of these). */
-#define MAP_SHARED 0x01 /* Share changes. */
-#define MAP_PRIVATE 0x02 /* Changes are private. */
-#ifdef __USE_MISC
-# define MAP_TYPE 0x0f /* Mask for type of mapping. */
-#endif
-
-/* Other flags. */
-#define MAP_FIXED 0x10 /* Interpret addr exactly. */
-#ifdef __USE_MISC
-# define MAP_FILE 0
-# define MAP_ANONYMOUS 0x20 /* Don't use a file. */
-# define MAP_ANON MAP_ANONYMOUS
-#endif
-
/* These are Linux-specific. */
#ifdef __USE_MISC
# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */
@@ -66,47 +36,5 @@
# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
#endif
-/* Flags to `msync'. */
-#define MS_ASYNC 1 /* Sync memory asynchronously. */
-#define MS_SYNC 4 /* Synchronous memory sync. */
-#define MS_INVALIDATE 2 /* Invalidate the caches. */
-
-/* Flags for `mlockall'. */
-#define MCL_CURRENT 1 /* Lock all currently mapped pages. */
-#define MCL_FUTURE 2 /* Lock all additions to address
- space. */
-
-/* Flags for `mremap'. */
-#ifdef __USE_GNU
-# define MREMAP_MAYMOVE 1
-# define MREMAP_FIXED 2
-#endif
-
-/* 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_MERGEABLE 12 /* KSM may merge identical pages. */
-# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
-# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */
-# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */
-# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump,
- overrides the coredump filter bits. */
-# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */
-# define MADV_HWPOISON 100 /* Poison a page for testing. */
-#endif
-
-/* The POSIX people had to invent similar names for the same things. */
-#ifdef __USE_XOPEN2K
-# define POSIX_MADV_NORMAL 0 /* No further special treatment. */
-# define POSIX_MADV_RANDOM 1 /* Expect random page references. */
-# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */
-# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */
-#endif
+/* Include generic Linux declarations. */
+#include <bits/mman-linux.h>
--
1.8.1.4
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 1/6] Use bits/mman-linux.h for AM33
2013-03-05 19:53 [PATCH 0/6] Use common <bits/mman-linux.h> for various ports Andreas Jaeger
@ 2013-03-05 19:37 ` Andreas Jaeger
2013-03-05 19:37 ` [PATCH 3/6] Use bits/mman-linux.h for IA64 Andreas Jaeger
` (4 subsequent siblings)
5 siblings, 0 replies; 20+ messages in thread
From: Andreas Jaeger @ 2013-03-05 19:37 UTC (permalink / raw)
To: libc-ports
---
ports/sysdeps/unix/sysv/linux/am33/bits/mman.h | 63 +-------------------------
1 file changed, 2 insertions(+), 61 deletions(-)
diff --git a/ports/sysdeps/unix/sysv/linux/am33/bits/mman.h b/ports/sysdeps/unix/sysv/linux/am33/bits/mman.h
index 5dd8ae1..a6e85f9 100644
--- a/ports/sysdeps/unix/sysv/linux/am33/bits/mman.h
+++ b/ports/sysdeps/unix/sysv/linux/am33/bits/mman.h
@@ -24,35 +24,6 @@
But the kernel header is not namespace clean. */
-/* Protections are chosen from these bits, OR'd together. The
- implementation does not necessarily support PROT_EXEC or PROT_WRITE
- without PROT_READ. The only guarantees are that no writing will be
- allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
-
-#define PROT_READ 0x1 /* Page can be read. */
-#define PROT_WRITE 0x2 /* Page can be written. */
-#define PROT_EXEC 0x4 /* Page can be executed. */
-#define PROT_NONE 0x0 /* Page can not be accessed. */
-#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of
- growsdown vma (mprotect only). */
-#define PROT_GROWSUP 0x02000000 /* Extend change to start of
- growsup vma (mprotect only). */
-
-/* Sharing types (must choose one and only one of these). */
-#define MAP_SHARED 0x01 /* Share changes. */
-#define MAP_PRIVATE 0x02 /* Changes are private. */
-#ifdef __USE_MISC
-# define MAP_TYPE 0x0f /* Mask for type of mapping. */
-#endif
-
-/* Other flags. */
-#define MAP_FIXED 0x10 /* Interpret addr exactly. */
-#ifdef __USE_MISC
-# define MAP_FILE 0
-# define MAP_ANONYMOUS 0x20 /* Don't use a file. */
-# define MAP_ANON MAP_ANONYMOUS
-#endif
-
/* These are Linux-specific. */
#ifdef __USE_MISC
# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */
@@ -62,35 +33,5 @@
# define MAP_NORESERVE 0x4000 /* Don't check for reservations. */
#endif
-/* Flags to `msync'. */
-#define MS_ASYNC 1 /* Sync memory asynchronously. */
-#define MS_SYNC 4 /* Synchronous memory sync. */
-#define MS_INVALIDATE 2 /* Invalidate the caches. */
-
-/* Flags for `mlockall'. */
-#define MCL_CURRENT 1 /* Lock all currently mapped pages. */
-#define MCL_FUTURE 2 /* Lock all additions to address
- space. */
-
-/* Flags for `mremap'. */
-#ifdef __USE_GNU
-# define MREMAP_MAYMOVE 1
-#endif
-
-/* 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. */
-#endif
-
-/* The POSIX people had to invent similar names for the same things. */
-#ifdef __USE_XOPEN2K
-# define POSIX_MADV_NORMAL 0 /* No further special treatment. */
-# define POSIX_MADV_RANDOM 1 /* Expect random page references. */
-# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */
-# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */
-#endif
+/* Include generic Linux declarations. */
+#include <bits/mman-linux.h>
--
1.8.1.4
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 6/6] Use bits/mman-linux.h for TILE
2013-03-05 19:53 [PATCH 0/6] Use common <bits/mman-linux.h> for various ports Andreas Jaeger
` (3 preceding siblings ...)
2013-03-05 19:37 ` [PATCH 4/6] Use bits/mman-linux.h for M68K Andreas Jaeger
@ 2013-03-05 19:37 ` Andreas Jaeger
2013-03-05 19:48 ` Chris Metcalf
2013-03-05 19:53 ` [PATCH 5/6] Use bits/mman-linux.h for MIPS Andreas Jaeger
5 siblings, 1 reply; 20+ messages in thread
From: Andreas Jaeger @ 2013-03-05 19:37 UTC (permalink / raw)
To: libc-ports
---
ports/sysdeps/unix/sysv/linux/tile/bits/mman.h | 76 +-------------------------
1 file changed, 2 insertions(+), 74 deletions(-)
diff --git a/ports/sysdeps/unix/sysv/linux/tile/bits/mman.h b/ports/sysdeps/unix/sysv/linux/tile/bits/mman.h
index 7494ee5..02fddec 100644
--- a/ports/sysdeps/unix/sysv/linux/tile/bits/mman.h
+++ b/ports/sysdeps/unix/sysv/linux/tile/bits/mman.h
@@ -23,36 +23,6 @@
/* The following definitions basically come from the kernel headers.
But the kernel header is not namespace clean. */
-
-/* Protections are chosen from these bits, OR'd together. The
- implementation does not necessarily support PROT_EXEC or PROT_WRITE
- without PROT_READ. The only guarantees are that no writing will be
- allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
-
-#define PROT_READ 0x1 /* Page can be read. */
-#define PROT_WRITE 0x2 /* Page can be written. */
-#define PROT_EXEC 0x4 /* Page can be executed. */
-#define PROT_NONE 0x0 /* Page can not be accessed. */
-#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of
- growsdown vma (mprotect only). */
-#define PROT_GROWSUP 0x02000000 /* Extend change to start of
- growsup vma (mprotect only). */
-
-/* Sharing types (must choose one and only one of these). */
-#define MAP_SHARED 0x01 /* Share changes. */
-#define MAP_PRIVATE 0x02 /* Changes are private. */
-#ifdef __USE_MISC
-# define MAP_TYPE 0x0f /* Mask for type of mapping. */
-#endif
-
-/* Other flags. */
-#define MAP_FIXED 0x10 /* Interpret addr exactly. */
-#ifdef __USE_MISC
-# define MAP_FILE 0
-# define MAP_ANONYMOUS 0x20 /* Don't use a file. */
-# define MAP_ANON MAP_ANONYMOUS
-#endif
-
#ifdef __USE_MISC
/* These are Linux-specific. */
# define MAP_NONBLOCK 0x00080 /* Do not block on IO. */
@@ -66,47 +36,5 @@
# define MAP_HUGETLB 0x04000 /* Create huge page mapping. */
#endif
-/* Flags to `msync'. */
-#define MS_ASYNC 1 /* Sync memory asynchronously. */
-#define MS_SYNC 4 /* Synchronous memory sync. */
-#define MS_INVALIDATE 2 /* Invalidate the caches. */
-
-/* Flags for `mlockall'. */
-#define MCL_CURRENT 1 /* Lock all currently mapped pages. */
-#define MCL_FUTURE 2 /* Lock all additions to address
- space. */
-
-/* Flags for `mremap'. */
-#ifdef __USE_GNU
-# define MREMAP_MAYMOVE 1
-# define MREMAP_FIXED 2
-#endif
-
-/* 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_MERGEABLE 12 /* KSM may merge identical pages. */
-# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
-# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */
-# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */
-# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump,
- overrides the coredump filter bits. */
-# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */
-# define MADV_HWPOISON 100 /* Poison a page for testing. */
-#endif
-
-/* The POSIX people had to invent similar names for the same things. */
-#ifdef __USE_XOPEN2K
-# define POSIX_MADV_NORMAL 0 /* No further special treatment. */
-# define POSIX_MADV_RANDOM 1 /* Expect random page references. */
-# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */
-# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */
-#endif
+/* Include generic Linux declarations. */
+#include <bits/mman-linux.h>
--
1.8.1.4
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 3/6] Use bits/mman-linux.h for IA64
2013-03-05 19:53 [PATCH 0/6] Use common <bits/mman-linux.h> for various ports Andreas Jaeger
2013-03-05 19:37 ` [PATCH 1/6] Use bits/mman-linux.h for AM33 Andreas Jaeger
@ 2013-03-05 19:37 ` Andreas Jaeger
2013-03-10 14:58 ` Andreas Jaeger
2013-03-05 19:37 ` [PATCH 2/6] Use bits/mman-linux.h for ARM Andreas Jaeger
` (3 subsequent siblings)
5 siblings, 1 reply; 20+ messages in thread
From: Andreas Jaeger @ 2013-03-05 19:37 UTC (permalink / raw)
To: libc-ports
---
ports/sysdeps/unix/sysv/linux/ia64/bits/mman.h | 76 +-------------------------
1 file changed, 2 insertions(+), 74 deletions(-)
diff --git a/ports/sysdeps/unix/sysv/linux/ia64/bits/mman.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/mman.h
index fba16db..c3b1caf 100644
--- a/ports/sysdeps/unix/sysv/linux/ia64/bits/mman.h
+++ b/ports/sysdeps/unix/sysv/linux/ia64/bits/mman.h
@@ -23,36 +23,6 @@
/* The following definitions basically come from the kernel headers.
But the kernel header is not namespace clean. */
-
-/* Protections are chosen from these bits, OR'd together. The
- implementation does not necessarily support PROT_EXEC or PROT_WRITE
- without PROT_READ. The only guarantees are that no writing will be
- allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
-
-#define PROT_READ 0x1 /* Page can be read. */
-#define PROT_WRITE 0x2 /* Page can be written. */
-#define PROT_EXEC 0x4 /* Page can be executed. */
-#define PROT_NONE 0x0 /* Page can not be accessed. */
-#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of
- growsdown vma (mprotect only). */
-#define PROT_GROWSUP 0x02000000 /* Extend change to start of
- growsup vma (mprotect only). */
-
-/* Sharing types (must choose one and only one of these). */
-#define MAP_SHARED 0x01 /* Share changes. */
-#define MAP_PRIVATE 0x02 /* Changes are private. */
-#ifdef __USE_MISC
-# define MAP_TYPE 0x0f /* Mask for type of mapping. */
-#endif
-
-/* Other flags. */
-#define MAP_FIXED 0x10 /* Interpret addr exactly. */
-#ifdef __USE_MISC
-# define MAP_FILE 0
-# define MAP_ANONYMOUS 0x20 /* Don't use a file. */
-# define MAP_ANON MAP_ANONYMOUS
-#endif
-
/* These are Linux-specific. */
#ifdef __USE_MISC
# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */
@@ -67,47 +37,5 @@
# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
#endif
-/* Flags to `msync'. */
-#define MS_ASYNC 0x1 /* Sync memory asynchronously. */
-#define MS_INVALIDATE 0x2 /* Invalidate the caches. */
-#define MS_SYNC 0x4 /* Synchronous memory sync. */
-
-/* Flags for `mlockall'. */
-#define MCL_CURRENT 0x1 /* Lock all currently mapped pages. */
-#define MCL_FUTURE 0x2 /* Lock all additions to address
- space. */
-
-/* Flags for `mremap'. */
-#ifdef __USE_GNU
-# define MREMAP_MAYMOVE 1
-# define MREMAP_FIXED 2
-#endif
-
-/* 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_MERGEABLE 12 /* KSM may merge identical pages. */
-# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
-# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */
-# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */
-# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump,
- overrides the coredump filter bits. */
-# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */
-# define MADV_HWPOISON 100 /* Poison a page for testing. */
-#endif
-
-/* The POSIX people had to invent similar names for the same things. */
-#ifdef __USE_XOPEN2K
-# define POSIX_MADV_NORMAL 0 /* No further special treatment. */
-# define POSIX_MADV_RANDOM 1 /* Expect random page references. */
-# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */
-# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */
-#endif
+/* Include generic Linux declarations. */
+#include <bits/mman-linux.h>
--
1.8.1.4
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 6/6] Use bits/mman-linux.h for TILE
2013-03-05 19:37 ` [PATCH 6/6] Use bits/mman-linux.h for TILE Andreas Jaeger
@ 2013-03-05 19:48 ` Chris Metcalf
0 siblings, 0 replies; 20+ messages in thread
From: Chris Metcalf @ 2013-03-05 19:48 UTC (permalink / raw)
To: Andreas Jaeger; +Cc: libc-ports
Looks good, thanks.
--
Chris Metcalf, Tilera Corp.
http://www.tilera.com
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 5/6] Use bits/mman-linux.h for MIPS
2013-03-05 19:53 [PATCH 0/6] Use common <bits/mman-linux.h> for various ports Andreas Jaeger
` (4 preceding siblings ...)
2013-03-05 19:37 ` [PATCH 6/6] Use bits/mman-linux.h for TILE Andreas Jaeger
@ 2013-03-05 19:53 ` Andreas Jaeger
2013-03-05 23:39 ` Joseph S. Myers
5 siblings, 1 reply; 20+ messages in thread
From: Andreas Jaeger @ 2013-03-05 19:53 UTC (permalink / raw)
To: libc-ports
---
ports/sysdeps/unix/sysv/linux/mips/bits/mman.h | 77 ++------------------------
1 file changed, 4 insertions(+), 73 deletions(-)
diff --git a/ports/sysdeps/unix/sysv/linux/mips/bits/mman.h b/ports/sysdeps/unix/sysv/linux/mips/bits/mman.h
index a13a900..80d6d2e 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/bits/mman.h
+++ b/ports/sysdeps/unix/sysv/linux/mips/bits/mman.h
@@ -23,37 +23,6 @@
/* The following definitions basically come from the kernel headers.
But the kernel header is not namespace clean. */
-
-/* Protections are chosen from these bits, OR'd together. The
- implementation does not necessarily support PROT_EXEC or PROT_WRITE
- without PROT_READ. The only guarantees are that no writing will be
- allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
-
-#define PROT_READ 0x1 /* Page can be read. */
-#define PROT_WRITE 0x2 /* Page can be written. */
-#define PROT_EXEC 0x4 /* Page can be executed. */
-#define PROT_NONE 0x0 /* Page can not be accessed. */
-#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of
- growsdown vma (mprotect only). */
-#define PROT_GROWSUP 0x02000000 /* Extend change to start of
- growsup vma (mprotect only). */
-
-/* Sharing types (must choose one and only one of these). */
-#define MAP_SHARED 0x01 /* Share changes. */
-#define MAP_PRIVATE 0x02 /* Changes are private. */
-#ifdef __USE_MISC
-# define MAP_TYPE 0x0f /* Mask for type of mapping. */
-#endif
-
-/* Other flags. */
-#define MAP_FIXED 0x10 /* Interpret addr exactly. */
-#ifdef __USE_MISC
-# define MAP_FILE 0
-# define MAP_ANONYMOUS 0x0800 /* Don't use a file. */
-# define MAP_ANON MAP_ANONYMOUS
-# define MAP_RENAME MAP_ANONYMOUS
-#endif
-
/* These are Linux-specific. */
#ifdef __USE_MISC
# define MAP_NORESERVE 0x0400 /* don't check for reservations */
@@ -68,47 +37,9 @@
# define MAP_HUGETLB 0x80000 /* Create huge page mapping. */
#endif
-/* Flags to `msync'. */
-#define MS_ASYNC 1 /* Sync memory asynchronously. */
-#define MS_SYNC 4 /* Synchronous memory sync. */
-#define MS_INVALIDATE 2 /* Invalidate the caches. */
-
-/* Flags for `mlockall'. */
-#define MCL_CURRENT 1 /* Lock all currently mapped pages. */
-#define MCL_FUTURE 2 /* Lock all additions to address
- space. */
-
-/* Flags for `mremap'. */
-#ifdef __USE_GNU
-# define MREMAP_MAYMOVE 1
-# define MREMAP_FIXED 2
-#endif
-
-/* 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_MERGEABLE 12 /* KSM may merge identical pages. */
-# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
-# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */
-# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */
-# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump,
- overrides the coredump filter bits. */
-# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */
-# define MADV_HWPOISON 100 /* Poison a page for testing. */
-#endif
+/* Include generic Linux declarations. */
+#include <bits/mman-linux.h>
-/* The POSIX people had to invent similar names for the same things. */
-#ifdef __USE_XOPEN2K
-# define POSIX_MADV_NORMAL 0 /* No further special treatment. */
-# define POSIX_MADV_RANDOM 1 /* Expect random page references. */
-# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */
-# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */
+#ifdef __USE_MISC
+# define MAP_RENAME MAP_ANONYMOUS
#endif
--
1.8.1.4
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 0/6] Use common <bits/mman-linux.h> for various ports
@ 2013-03-05 19:53 Andreas Jaeger
2013-03-05 19:37 ` [PATCH 1/6] Use bits/mman-linux.h for AM33 Andreas Jaeger
` (5 more replies)
0 siblings, 6 replies; 20+ messages in thread
From: Andreas Jaeger @ 2013-03-05 19:53 UTC (permalink / raw)
To: libc-ports
Following my changes to the other Linux files, here's a patch series
to use a common <bits/mman-linux.h> from <bits/mman.h>.
This is not done for Alpha and HPPA since their values are too different
from all other ports.
Andreas
Andreas Jaeger (6):
Use bits/mman-linux.h for AM33
Use bits/mman-linux.h for ARM
Use bits/mman-linux.h for IA64
Use bits/mman-linux.h for M68K
Use bits/mman-linux.h for MIPS
Use bits/mman-linux.h for TILE
ports/sysdeps/unix/sysv/linux/am33/bits/mman.h | 63 +--------------------
ports/sysdeps/unix/sysv/linux/arm/bits/mman.h | 76 +------------------------
ports/sysdeps/unix/sysv/linux/ia64/bits/mman.h | 76 +------------------------
ports/sysdeps/unix/sysv/linux/m68k/bits/mman.h | 76 +------------------------
ports/sysdeps/unix/sysv/linux/mips/bits/mman.h | 77 ++------------------------
ports/sysdeps/unix/sysv/linux/tile/bits/mman.h | 76 +------------------------
6 files changed, 14 insertions(+), 430 deletions(-)
--
1.8.1.4
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 4/6] Use bits/mman-linux.h for M68K
2013-03-05 19:37 ` [PATCH 4/6] Use bits/mman-linux.h for M68K Andreas Jaeger
@ 2013-03-05 22:55 ` Andreas Schwab
0 siblings, 0 replies; 20+ messages in thread
From: Andreas Schwab @ 2013-03-05 22:55 UTC (permalink / raw)
To: Andreas Jaeger; +Cc: libc-ports
Ok with a changelog.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 2/6] Use bits/mman-linux.h for ARM
2013-03-05 19:37 ` [PATCH 2/6] Use bits/mman-linux.h for ARM Andreas Jaeger
@ 2013-03-05 23:36 ` Joseph S. Myers
0 siblings, 0 replies; 20+ messages in thread
From: Joseph S. Myers @ 2013-03-05 23:36 UTC (permalink / raw)
To: Andreas Jaeger; +Cc: libc-ports
OK.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 5/6] Use bits/mman-linux.h for MIPS
2013-03-05 19:53 ` [PATCH 5/6] Use bits/mman-linux.h for MIPS Andreas Jaeger
@ 2013-03-05 23:39 ` Joseph S. Myers
2013-03-06 8:25 ` Andreas Jaeger
0 siblings, 1 reply; 20+ messages in thread
From: Joseph S. Myers @ 2013-03-05 23:39 UTC (permalink / raw)
To: Andreas Jaeger; +Cc: libc-ports
On Tue, 5 Mar 2013, Andreas Jaeger wrote:
> -# define MAP_ANONYMOUS 0x0800 /* Don't use a file. */
That value's different from that in the generic header.
> -# define MAP_RENAME MAP_ANONYMOUS
And that name's not in the generic header.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 5/6] Use bits/mman-linux.h for MIPS
2013-03-05 23:39 ` Joseph S. Myers
@ 2013-03-06 8:25 ` Andreas Jaeger
2013-03-06 15:48 ` Andreas Jaeger
0 siblings, 1 reply; 20+ messages in thread
From: Andreas Jaeger @ 2013-03-06 8:25 UTC (permalink / raw)
To: Joseph S. Myers; +Cc: libc-ports
On Tuesday, March 05, 2013 23:39:00 Joseph S. Myers wrote:
> On Tue, 5 Mar 2013, Andreas Jaeger wrote:
> > -# define MAP_ANONYMOUS 0x0800 /* Don't use a file. */
>
> That value's different from that in the generic header.
Indeed and I overlooked that one.
I'll send a new patch that allow to redefine this value in the generic
header.
> > -# define MAP_RENAME MAP_ANONYMOUS
>
> And that name's not in the generic header.
See the last lines of the patch - I need to define this after the
include.
Andreas
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 5/6] Use bits/mman-linux.h for MIPS
2013-03-06 8:25 ` Andreas Jaeger
@ 2013-03-06 15:48 ` Andreas Jaeger
2013-03-06 16:33 ` Joseph S. Myers
2013-03-11 12:20 ` Thomas Schwinge
0 siblings, 2 replies; 20+ messages in thread
From: Andreas Jaeger @ 2013-03-06 15:48 UTC (permalink / raw)
To: Joseph S. Myers; +Cc: libc-ports
Here's an updated patch, ok now?
Andreas
2013-03-06 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/bits/mman-linux.h (MAP_ANONYMOUS): Allow
definition via __MAP_ANONYMOUS.
ChangeLog.mips:
* sysdeps/unix/sysv/linux/mips/bits/mman.h: Remove all defines
provided by bits/mman-linux.h and include <bits/mman-linux.h>.
(__MAP_ANONYMOUS): Define.
diff --git a/ports/sysdeps/unix/sysv/linux/mips/bits/mman.h b/ports/sysdeps/unix/sysv/linux/mips/bits/mman.h
index a13a900..883f947 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/bits/mman.h
+++ b/ports/sysdeps/unix/sysv/linux/mips/bits/mman.h
@@ -23,37 +23,6 @@
/* The following definitions basically come from the kernel headers.
But the kernel header is not namespace clean. */
-
-/* Protections are chosen from these bits, OR'd together. The
- implementation does not necessarily support PROT_EXEC or PROT_WRITE
- without PROT_READ. The only guarantees are that no writing will be
- allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
-
-#define PROT_READ 0x1 /* Page can be read. */
-#define PROT_WRITE 0x2 /* Page can be written. */
-#define PROT_EXEC 0x4 /* Page can be executed. */
-#define PROT_NONE 0x0 /* Page can not be accessed. */
-#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of
- growsdown vma (mprotect only). */
-#define PROT_GROWSUP 0x02000000 /* Extend change to start of
- growsup vma (mprotect only). */
-
-/* Sharing types (must choose one and only one of these). */
-#define MAP_SHARED 0x01 /* Share changes. */
-#define MAP_PRIVATE 0x02 /* Changes are private. */
-#ifdef __USE_MISC
-# define MAP_TYPE 0x0f /* Mask for type of mapping. */
-#endif
-
-/* Other flags. */
-#define MAP_FIXED 0x10 /* Interpret addr exactly. */
-#ifdef __USE_MISC
-# define MAP_FILE 0
-# define MAP_ANONYMOUS 0x0800 /* Don't use a file. */
-# define MAP_ANON MAP_ANONYMOUS
-# define MAP_RENAME MAP_ANONYMOUS
-#endif
-
/* These are Linux-specific. */
#ifdef __USE_MISC
# define MAP_NORESERVE 0x0400 /* don't check for reservations */
@@ -68,47 +37,11 @@
# define MAP_HUGETLB 0x80000 /* Create huge page mapping. */
#endif
-/* Flags to `msync'. */
-#define MS_ASYNC 1 /* Sync memory asynchronously. */
-#define MS_SYNC 4 /* Synchronous memory sync. */
-#define MS_INVALIDATE 2 /* Invalidate the caches. */
-
-/* Flags for `mlockall'. */
-#define MCL_CURRENT 1 /* Lock all currently mapped pages. */
-#define MCL_FUTURE 2 /* Lock all additions to address
- space. */
-
-/* Flags for `mremap'. */
-#ifdef __USE_GNU
-# define MREMAP_MAYMOVE 1
-# define MREMAP_FIXED 2
-#endif
+#define __MAP_ANONYMOUS 0x0800
-/* 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_MERGEABLE 12 /* KSM may merge identical pages. */
-# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
-# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */
-# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */
-# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump,
- overrides the coredump filter bits. */
-# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */
-# define MADV_HWPOISON 100 /* Poison a page for testing. */
-#endif
+/* Include generic Linux declarations. */
+#include <bits/mman-linux.h>
-/* The POSIX people had to invent similar names for the same things. */
-#ifdef __USE_XOPEN2K
-# define POSIX_MADV_NORMAL 0 /* No further special treatment. */
-# define POSIX_MADV_RANDOM 1 /* Expect random page references. */
-# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */
-# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */
+#ifdef __USE_MISC
+# define MAP_RENAME MAP_ANONYMOUS
#endif
diff --git a/sysdeps/unix/sysv/linux/bits/mman-linux.h b/sysdeps/unix/sysv/linux/bits/mman-linux.h
index 27d2dc4..05d2d92 100644
--- a/sysdeps/unix/sysv/linux/bits/mman-linux.h
+++ b/sysdeps/unix/sysv/linux/bits/mman-linux.h
@@ -49,7 +49,11 @@
#define MAP_FIXED 0x10 /* Interpret addr exactly. */
#ifdef __USE_MISC
# define MAP_FILE 0
-# define MAP_ANONYMOUS 0x20 /* Don't use a file. */
+# ifdef __MAP_ANONYMOUS
+# define MAP_ANONYMOUS __MAP_ANONYMOUS /* Don't use a file. */
+# else
+# define MAP_ANONYMOUS 0x20 /* Don't use a file. */
+# endif
# define MAP_ANON MAP_ANONYMOUS
/* When MAP_HUGETLB is set bits [26:31] encode the log2 of the huge page size. */
# define MAP_HUGE_SHIFT 26
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 5/6] Use bits/mman-linux.h for MIPS
2013-03-06 15:48 ` Andreas Jaeger
@ 2013-03-06 16:33 ` Joseph S. Myers
2013-03-06 16:39 ` Andreas Jaeger
2013-03-11 12:20 ` Thomas Schwinge
1 sibling, 1 reply; 20+ messages in thread
From: Joseph S. Myers @ 2013-03-06 16:33 UTC (permalink / raw)
To: Andreas Jaeger; +Cc: libc-ports
On Wed, 6 Mar 2013, Andreas Jaeger wrote:
> Here's an updated patch, ok now?
>
> Andreas
>
> 2013-03-06 Andreas Jaeger <aj@suse.de>
>
> * sysdeps/unix/sysv/linux/bits/mman-linux.h (MAP_ANONYMOUS): Allow
> definition via __MAP_ANONYMOUS.
>
> ChangeLog.mips:
> * sysdeps/unix/sysv/linux/mips/bits/mman.h: Remove all defines
> provided by bits/mman-linux.h and include <bits/mman-linux.h>.
> (__MAP_ANONYMOUS): Define.
OK. In general I think defining __* names ought to be the right approach
for architectures with more substantial differences in the values as well,
so that the architecture-specific headers never need to concern themselves
with the feature-test macros that determine when to expose non-__* names
to the user.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 5/6] Use bits/mman-linux.h for MIPS
2013-03-06 16:33 ` Joseph S. Myers
@ 2013-03-06 16:39 ` Andreas Jaeger
0 siblings, 0 replies; 20+ messages in thread
From: Andreas Jaeger @ 2013-03-06 16:39 UTC (permalink / raw)
To: Joseph S. Myers; +Cc: libc-ports
On 03/06/2013 05:33 PM, Joseph S. Myers wrote:
> On Wed, 6 Mar 2013, Andreas Jaeger wrote:
>
>> Here's an updated patch, ok now?
>>
>> Andreas
>>
>> 2013-03-06 Andreas Jaeger <aj@suse.de>
>>
>> * sysdeps/unix/sysv/linux/bits/mman-linux.h (MAP_ANONYMOUS): Allow
>> definition via __MAP_ANONYMOUS.
>>
>> ChangeLog.mips:
>> * sysdeps/unix/sysv/linux/mips/bits/mman.h: Remove all defines
>> provided by bits/mman-linux.h and include <bits/mman-linux.h>.
>> (__MAP_ANONYMOUS): Define.
>
> OK. In general I think defining __* names ought to be the right approach
> for architectures with more substantial differences in the values as well,
> so that the architecture-specific headers never need to concern themselves
> with the feature-test macros that determine when to expose non-__* names
> to the user.
Yes, further cleanup steps are possible here.
Andreas
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 3/6] Use bits/mman-linux.h for IA64
2013-03-05 19:37 ` [PATCH 3/6] Use bits/mman-linux.h for IA64 Andreas Jaeger
@ 2013-03-10 14:58 ` Andreas Jaeger
2013-03-10 21:52 ` Mike Frysinger
0 siblings, 1 reply; 20+ messages in thread
From: Andreas Jaeger @ 2013-03-10 14:58 UTC (permalink / raw)
To: libc-ports, Mike Frysinger
Mike, is this ok?
Andreas
On 03/05/2013 08:37 PM, Andreas Jaeger wrote:
> ---
> ports/sysdeps/unix/sysv/linux/ia64/bits/mman.h | 76 +-------------------------
> 1 file changed, 2 insertions(+), 74 deletions(-)
>
> diff --git a/ports/sysdeps/unix/sysv/linux/ia64/bits/mman.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/mman.h
> index fba16db..c3b1caf 100644
> --- a/ports/sysdeps/unix/sysv/linux/ia64/bits/mman.h
> +++ b/ports/sysdeps/unix/sysv/linux/ia64/bits/mman.h
> @@ -23,36 +23,6 @@
> /* The following definitions basically come from the kernel headers.
> But the kernel header is not namespace clean. */
>
> -
> -/* Protections are chosen from these bits, OR'd together. The
> - implementation does not necessarily support PROT_EXEC or PROT_WRITE
> - without PROT_READ. The only guarantees are that no writing will be
> - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
> -
> -#define PROT_READ 0x1 /* Page can be read. */
> -#define PROT_WRITE 0x2 /* Page can be written. */
> -#define PROT_EXEC 0x4 /* Page can be executed. */
> -#define PROT_NONE 0x0 /* Page can not be accessed. */
> -#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of
> - growsdown vma (mprotect only). */
> -#define PROT_GROWSUP 0x02000000 /* Extend change to start of
> - growsup vma (mprotect only). */
> -
> -/* Sharing types (must choose one and only one of these). */
> -#define MAP_SHARED 0x01 /* Share changes. */
> -#define MAP_PRIVATE 0x02 /* Changes are private. */
> -#ifdef __USE_MISC
> -# define MAP_TYPE 0x0f /* Mask for type of mapping. */
> -#endif
> -
> -/* Other flags. */
> -#define MAP_FIXED 0x10 /* Interpret addr exactly. */
> -#ifdef __USE_MISC
> -# define MAP_FILE 0
> -# define MAP_ANONYMOUS 0x20 /* Don't use a file. */
> -# define MAP_ANON MAP_ANONYMOUS
> -#endif
> -
> /* These are Linux-specific. */
> #ifdef __USE_MISC
> # define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */
> @@ -67,47 +37,5 @@
> # define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
> #endif
>
> -/* Flags to `msync'. */
> -#define MS_ASYNC 0x1 /* Sync memory asynchronously. */
> -#define MS_INVALIDATE 0x2 /* Invalidate the caches. */
> -#define MS_SYNC 0x4 /* Synchronous memory sync. */
> -
> -/* Flags for `mlockall'. */
> -#define MCL_CURRENT 0x1 /* Lock all currently mapped pages. */
> -#define MCL_FUTURE 0x2 /* Lock all additions to address
> - space. */
> -
> -/* Flags for `mremap'. */
> -#ifdef __USE_GNU
> -# define MREMAP_MAYMOVE 1
> -# define MREMAP_FIXED 2
> -#endif
> -
> -/* 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_MERGEABLE 12 /* KSM may merge identical pages. */
> -# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
> -# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */
> -# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */
> -# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump,
> - overrides the coredump filter bits. */
> -# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */
> -# define MADV_HWPOISON 100 /* Poison a page for testing. */
> -#endif
> -
> -/* The POSIX people had to invent similar names for the same things. */
> -#ifdef __USE_XOPEN2K
> -# define POSIX_MADV_NORMAL 0 /* No further special treatment. */
> -# define POSIX_MADV_RANDOM 1 /* Expect random page references. */
> -# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */
> -# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */
> -# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */
> -#endif
> +/* Include generic Linux declarations. */
> +#include <bits/mman-linux.h>
>
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 3/6] Use bits/mman-linux.h for IA64
2013-03-10 14:58 ` Andreas Jaeger
@ 2013-03-10 21:52 ` Mike Frysinger
0 siblings, 0 replies; 20+ messages in thread
From: Mike Frysinger @ 2013-03-10 21:52 UTC (permalink / raw)
To: libc-ports; +Cc: Andreas Jaeger
[-- Attachment #1: Type: Text/Plain, Size: 182 bytes --]
On Sunday 10 March 2013 10:58:36 Andreas Jaeger wrote:
> Mike, is this ok?
i kicked off a build last nite. it came back OK. so:
Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 5/6] Use bits/mman-linux.h for MIPS
2013-03-06 15:48 ` Andreas Jaeger
2013-03-06 16:33 ` Joseph S. Myers
@ 2013-03-11 12:20 ` Thomas Schwinge
2013-03-11 13:17 ` Andreas Jaeger
2013-03-11 15:12 ` Joseph S. Myers
1 sibling, 2 replies; 20+ messages in thread
From: Thomas Schwinge @ 2013-03-11 12:20 UTC (permalink / raw)
To: Andreas Jaeger, Joseph S. Myers; +Cc: libc-ports
[-- Attachment #1: Type: text/plain, Size: 1376 bytes --]
Hi!
On Wed, 06 Mar 2013 16:47:58 +0100, Andreas Jaeger <aj@suse.com> wrote:
> 2013-03-06 Andreas Jaeger <aj@suse.de>
>
> * sysdeps/unix/sysv/linux/bits/mman-linux.h (MAP_ANONYMOUS): Allow
> definition via __MAP_ANONYMOUS.
>
> ChangeLog.mips:
> * sysdeps/unix/sysv/linux/mips/bits/mman.h: Remove all defines
> provided by bits/mman-linux.h and include <bits/mman-linux.h>.
> (__MAP_ANONYMOUS): Define.
With the current master branch (including this change as commit
664a9ce4ca40feabff781fff044c93a43ae15b59), I get redefinition warnings
for MAP_ANONYMOUS; solved by the following patch. OK to push?
ports/ChangeLog.mips
* sysdeps/unix/sysv/linux/mips/bits/mman.h [__USE_MISC]
(MAP_ANONYMOUS): Don't define.
diff --git ports/sysdeps/unix/sysv/linux/mips/bits/mman.h ports/sysdeps/unix/sysv/linux/mips/bits/mman.h
index 883f947..b327795 100644
--- ports/sysdeps/unix/sysv/linux/mips/bits/mman.h
+++ ports/sysdeps/unix/sysv/linux/mips/bits/mman.h
@@ -26,7 +26,6 @@
/* These are Linux-specific. */
#ifdef __USE_MISC
# define MAP_NORESERVE 0x0400 /* don't check for reservations */
-# define MAP_ANONYMOUS 0x0800 /* don't use a file */
# define MAP_GROWSDOWN 0x1000 /* stack-like segment */
# define MAP_DENYWRITE 0x2000 /* ETXTBSY */
# define MAP_EXECUTABLE 0x4000 /* mark it as an executable */
Grüße,
Thomas
[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 5/6] Use bits/mman-linux.h for MIPS
2013-03-11 12:20 ` Thomas Schwinge
@ 2013-03-11 13:17 ` Andreas Jaeger
2013-03-11 15:12 ` Joseph S. Myers
1 sibling, 0 replies; 20+ messages in thread
From: Andreas Jaeger @ 2013-03-11 13:17 UTC (permalink / raw)
To: Thomas Schwinge; +Cc: Joseph S. Myers, libc-ports
[-- Attachment #1: Type: text/plain, Size: 1903 bytes --]
On Monday, March 11, 2013 13:19:53 Thomas Schwinge wrote:
> Hi!
>
> On Wed, 06 Mar 2013 16:47:58 +0100, Andreas Jaeger <aj@suse.com>
wrote:
> > 2013-03-06 Andreas Jaeger <aj@suse.de>
> >
> > * sysdeps/unix/sysv/linux/bits/mman-linux.h (MAP_ANONYMOUS):
Allow
> > definition via __MAP_ANONYMOUS.
> >
> > ChangeLog.mips:
> > * sysdeps/unix/sysv/linux/mips/bits/mman.h: Remove all defines
> > provided by bits/mman-linux.h and include <bits/mman-linux.h>.
> > (__MAP_ANONYMOUS): Define.
>
> With the current master branch (including this change as commit
> 664a9ce4ca40feabff781fff044c93a43ae15b59), I get redefinition warnings
> for MAP_ANONYMOUS; solved by the following patch. OK to push?
>
> ports/ChangeLog.mips
> * sysdeps/unix/sysv/linux/mips/bits/mman.h [__USE_MISC]
> (MAP_ANONYMOUS): Don't define.
>
> diff --git ports/sysdeps/unix/sysv/linux/mips/bits/mman.h
> ports/sysdeps/unix/sysv/linux/mips/bits/mman.h index 883f947..b327795
> 100644
> --- ports/sysdeps/unix/sysv/linux/mips/bits/mman.h
> +++ ports/sysdeps/unix/sysv/linux/mips/bits/mman.h
> @@ -26,7 +26,6 @@
> /* These are Linux-specific. */
> #ifdef __USE_MISC
> # define MAP_NORESERVE 0x0400 /* don't check for
reservations */
> -# define MAP_ANONYMOUS 0x0800 /* don't use a file */
> # define MAP_GROWSDOWN 0x1000 /* stack-like segment */
> # define MAP_DENYWRITE 0x2000 /* ETXTBSY */
> # define MAP_EXECUTABLE 0x4000 /* mark it as an executable */
Yes, that was the intention - to remove this define.
I would consider this an obvious cleanup,
Thanks,
Andreas
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 5/6] Use bits/mman-linux.h for MIPS
2013-03-11 12:20 ` Thomas Schwinge
2013-03-11 13:17 ` Andreas Jaeger
@ 2013-03-11 15:12 ` Joseph S. Myers
1 sibling, 0 replies; 20+ messages in thread
From: Joseph S. Myers @ 2013-03-11 15:12 UTC (permalink / raw)
To: Thomas Schwinge; +Cc: Andreas Jaeger, libc-ports
On Mon, 11 Mar 2013, Thomas Schwinge wrote:
> ports/ChangeLog.mips
> * sysdeps/unix/sysv/linux/mips/bits/mman.h [__USE_MISC]
> (MAP_ANONYMOUS): Don't define.
OK.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2013-03-11 15:12 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-05 19:53 [PATCH 0/6] Use common <bits/mman-linux.h> for various ports Andreas Jaeger
2013-03-05 19:37 ` [PATCH 1/6] Use bits/mman-linux.h for AM33 Andreas Jaeger
2013-03-05 19:37 ` [PATCH 3/6] Use bits/mman-linux.h for IA64 Andreas Jaeger
2013-03-10 14:58 ` Andreas Jaeger
2013-03-10 21:52 ` Mike Frysinger
2013-03-05 19:37 ` [PATCH 2/6] Use bits/mman-linux.h for ARM Andreas Jaeger
2013-03-05 23:36 ` Joseph S. Myers
2013-03-05 19:37 ` [PATCH 4/6] Use bits/mman-linux.h for M68K Andreas Jaeger
2013-03-05 22:55 ` Andreas Schwab
2013-03-05 19:37 ` [PATCH 6/6] Use bits/mman-linux.h for TILE Andreas Jaeger
2013-03-05 19:48 ` Chris Metcalf
2013-03-05 19:53 ` [PATCH 5/6] Use bits/mman-linux.h for MIPS Andreas Jaeger
2013-03-05 23:39 ` Joseph S. Myers
2013-03-06 8:25 ` Andreas Jaeger
2013-03-06 15:48 ` Andreas Jaeger
2013-03-06 16:33 ` Joseph S. Myers
2013-03-06 16:39 ` Andreas Jaeger
2013-03-11 12:20 ` Thomas Schwinge
2013-03-11 13:17 ` Andreas Jaeger
2013-03-11 15:12 ` Joseph S. Myers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).