From: "Joseph S. Myers" <joseph@codesourcery.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: <libc-ports@sourceware.org>,
David Holsgrove <david.holsgrove@xilinx.com>
Subject: Re: Miscellaneous ColdFire patches
Date: Fri, 28 Jun 2013 20:25:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.64.1306282023500.15167@digraph.polyomino.org.uk> (raw)
In-Reply-To: <87obaqgjlq.fsf@igel.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
next prev parent reply other threads:[~2013-06-28 20:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-28 16:00 Joseph S. Myers
2013-06-28 18:45 ` Andreas Schwab
2013-06-28 20:15 ` Joseph S. Myers
2013-06-30 20:57 ` Andreas Schwab
2013-06-28 20:25 ` Joseph S. Myers [this message]
2013-08-20 16:48 ` Ping for m68k MMAP2_PAGE_SHIFT fix Joseph S. Myers
2013-08-20 18:49 ` Andreas Schwab
2013-09-02 15:17 ` Ping " Joseph S. Myers
2013-09-04 20:44 ` Miscellaneous ColdFire patches Andreas Schwab
2013-06-28 20:32 ` Joseph S. Myers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.1306282023500.15167@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=david.holsgrove@xilinx.com \
--cc=libc-ports@sourceware.org \
--cc=schwab@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).