[PATCH] Remove PAGE_SIZE et al from sys/user.h

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Remove PAGE_SIZE et al from sys/user.h

Andrew Stubbs-5
The attached patch removes the constant definitions of PAGE_SIZE,
PAGE_SHIFT, and PAGE_MASK, from sys/user.h on architectures that allow
configurable page sizes.

Additionally, it also removes NBPG, UPAGES, HOST_TEXT_START_ADDR,
HOST_DATA_START_ADDR, and HOST_STACK_END_ADDR, partly because they are
defined in terms of PAGE_SIZE, but also because these are only needed
for trad-core support, and these architecture don't use that anyway.

This has been discussed previously here:

https://sourceware.org/ml/libc-ports/2013-11/msg00028.html

And on bugzilla here:

https://sourceware.org/bugzilla/show_bug.cgi?id=16191

Finally, I've adjusted tst-limits.c so that its PAGE_SIZE test is
applied to the definitions remaining in other architecture's user.h.

OK?

Andrew


glibc-bugzilla-16191.patch (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Remove PAGE_SIZE et al from sys/user.h

Andreas Schwab-2
Andrew Stubbs <[hidden email]> writes:

> diff --git a/stdlib/tst-limits.c b/stdlib/tst-limits.c
> index 265b9db..96fb25e 100644
> --- a/stdlib/tst-limits.c
> +++ b/stdlib/tst-limits.c
> @@ -5,6 +5,8 @@
>  #include <inttypes.h>
>  #include <stdio.h>
>  
> +/* For PAGE_SIZE.  */
> +#include <sys/user.h>

This has no place in stdlib.

Andreas.

--
Andreas Schwab, [hidden email]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Remove PAGE_SIZE et al from sys/user.h

Joseph Myers
In reply to this post by Andrew Stubbs-5
On Fri, 13 Dec 2013, Andrew Stubbs wrote:

> 2013-12-12  Andrew Stubbs  <[hidden email]>
>
        [BZ #16191]

(in each ChangeLog file getting an entry from this change)

> ports/

There are separate ChangeLogs for each architecture.

The MIPS changes are OK, but of course only list the bug in the list of
fixed bugs in NEWS, and close it, once the fixes for *all* architectures
are checked in (and keep pinging the fixes for other architectures as
needed until then, remembering to CC architecture maintainers if needed).

--
Joseph S. Myers
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Remove PAGE_SIZE et al from sys/user.h

Roland McGrath-4
In reply to this post by Andrew Stubbs-5
This is a user-visible API change, and so needs a BZ# by policy.