This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: Miscellaneous ColdFire patches
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: <libc-ports at sourceware dot org>, David Holsgrove <david dot holsgrove at xilinx dot com>
- Date: Fri, 28 Jun 2013 20:25:27 +0000
- Subject: Re: Miscellaneous ColdFire patches
- References: <Pine dot LNX dot 4 dot 64 dot 1306281549400 dot 27363 at digraph dot polyomino dot org dot uk> <87obaqgjlq dot fsf at igel dot home>
On Fri, 28 Jun 2013, Andreas Schwab wrote:
> "Joseph S. Myers" <joseph@codesourcery.com> writes:
>
> > 2013-06-28 Joseph Myers <joseph@codesourcery.com>
> >
> > * sysdeps/unix/sysv/linux/m68k/kernel-features.h [__mcoldfire__]
> > (MMAP2_PAGE_SHIFT): Define to -1.
>
> kernel-features.h is the wrong place to define this (mmap64.c should
> actually no longer include it). You should create a mmap64.c that
> defines MMAP2_PAGE_SHIFT and then falls through to the real
> implementation. Also, this is an issue for sun3 as well, so it needs to
> be defined for all m68k variants.
>
> Finally, you need to fix sysdeps/unix/sysv/linux/mmap64.c so that it
> doesn't shift by -1.
>
> (Looks like cris and microblaze have the same bug.)
This patch (untested) creates a new file and enables the change for
all m68k configurations. I've sent the fix to
sysdeps/unix/sysv/linux/mmap64.c to libc-alpha and filed bug 15705 for
the MicroBlaze issue (the CRIS port of glibc having been removed as
bitrotten some time ago).
2013-06-28 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/m68k/mmap64.c: New file.
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/mmap64.c b/ports/sysdeps/unix/sysv/linux/m68k/mmap64.c
new file mode 100644
index 0000000..8bf8987
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/m68k/mmap64.c
@@ -0,0 +1,5 @@
+/* ColdFire and Sun 3 kernels have PAGE_SHIFT set to 13 and expect
+ mmap2 offset to be provided in 8K pages. Determine the shift
+ dynamically with getpagesize. */
+#define MMAP2_PAGE_SHIFT -1
+#include <sysdeps/unix/sysv/linux/mmap64.c>
--
Joseph S. Myers
joseph@codesourcery.com