This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PAGE_SIZE definition for MIPS XLP


On Mon, Nov 18, 2013 at 4:29 AM, Andrew Stubbs <ams@codesourcery.com> wrote:
> MIPS' sys/user.h currently has a constant definition for PAGE_SIZE, and the
> other related settings. This is not appropriate for XLP (and other MIPS?)
> where the actual page size is a kernel configuration option.

The whole Octeon series of MIPS64 processors also supports other
PAGE_SIZEs.  Also the generic MIPS glibc should support other page
sizes too.

>
> Apart from the general principle of not having incorrect definitions, the
> actual problem that needs to be solved is in
> sysdeps/unix/sysv/linux/ifaddrs.c in which PAGE_SIZE is used by preference
> as an optimization. Most of the other possible use cases prefer to call
> __getpagesize or use sysconf, and so are unaffected.
>
> Clearly, keeping the constant definition is desirable on at least some MIPS
> variants, in order to keep the optimization, but not for XLP.

No it is not desirable if you want a generic glibc which works on all MIPS64.

>
> 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?

I think my attached patch is better way of fixing this issue which
just deletes them rather than special casing them.

Thanks,
Andrew Pinski

>
> Testcase tst-limits does check PAGE_SIZE matches, if defined, but not in
> this case because that test case does not include sys/user.h. Should I
> create a new test case for this, or include that header in the existing
> test?
>
> Thanks
>
> Andrew

Attachment: removepagesize.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]