This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [PATCH] PAGE_SIZE definition for MIPS XLP
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Andrew Stubbs <ams at codesourcery dot com>
- Cc: <libc-ports at sourceware dot org>
- Date: Mon, 18 Nov 2013 13:42:01 +0000
- Subject: Re: [PATCH] PAGE_SIZE definition for MIPS XLP
- Authentication-results: sourceware.org; auth=none
- References: <528A0813 dot 10005 at codesourcery dot com>
On Mon, 18 Nov 2013, Andrew Stubbs wrote:
> The attached patch makes the definition conditional, rather than removing it
> completely. It's not clear to me whether the HOST_* definitions are similarly
> affected, but other platforms that do not define PAGE_SIZE also choose not to
> define those, so I've extended the ifndef similarly.
>
> I this OK to commit? Should it be solved a different way?
This should be raised on libc-alpha, not libc-ports, as it's a generic
issue regarding what the glibc API is for PAGE_SIZE being provided or not
provided in sys/user.h.
It's definitely wrong to test _MIPS_ARCH_XLP like that - glibc built for
generic MIPS should work on all MIPS variants supporting all the
instructions used in that glibc binary, so the fact that MIPS has variable
page sizes means it's always wrong for MIPS glibc to embed a page size
assumption in the binaries. The question is whether PAGE_SIZE must only
be defined when it is the kernel page size, or whether it should also be
defined in some cases when it's some form of ABI page size even when that
differs from the kernel page size. I also see no rationale given for
making any of the other macros conditional.
At least MicroBlaze also has variable kernel page size but defines
PAGE_SIZE in sys/user.h.
--
Joseph S. Myers
joseph@codesourcery.com