From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17452 invoked by alias); 19 Nov 2013 02:32:56 -0000 Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org Received: (qmail 17440 invoked by uid 89); 19 Nov 2013 02:32:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_20,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RDNS_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: mail-we0-f170.google.com Received: from Unknown (HELO mail-we0-f170.google.com) (74.125.82.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 19 Nov 2013 02:32:54 +0000 Received: by mail-we0-f170.google.com with SMTP id w61so3416518wes.15 for ; Mon, 18 Nov 2013 18:32:44 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.180.210.237 with SMTP id mx13mr16960168wic.4.1384828364883; Mon, 18 Nov 2013 18:32:44 -0800 (PST) Received: by 10.217.119.193 with HTTP; Mon, 18 Nov 2013 18:32:44 -0800 (PST) In-Reply-To: <528A0813.10005@codesourcery.com> References: <528A0813.10005@codesourcery.com> Date: Tue, 19 Nov 2013 03:28:00 -0000 Message-ID: Subject: Re: [PATCH] PAGE_SIZE definition for MIPS XLP From: Andrew Pinski To: Andrew Stubbs Cc: "libc-ports@sourceware.org" Content-Type: multipart/mixed; boundary=001a11c25860c3d01904eb7e7abf X-IsSubscribed: yes X-SW-Source: 2013-11/txt/msg00036.txt.bz2 --001a11c25860c3d01904eb7e7abf Content-Type: text/plain; charset=UTF-8 Content-length: 1749 On Mon, Nov 18, 2013 at 4:29 AM, Andrew Stubbs 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 --001a11c25860c3d01904eb7e7abf Content-Type: text/plain; charset=US-ASCII; name="removepagesize.diff.txt" Content-Disposition: attachment; filename="removepagesize.diff.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ho6iyqce1 Content-length: 1383 Y29tbWl0IDIwMzY0YjA5ZjUyYTZjYjkzMTg4NzUyYjgyNWI2NWZiYWQ4MmU0 ZDcKQXV0aG9yOiBBbmRyZXcgUGluc2tpIDxhcGluc2tpQGNhdml1bS5jb20+ CkRhdGU6ICAgV2VkIEp1bCAxMSAxOToyODo1OCAyMDEyIC0wNzAwCgogICAg W1BBVENIIDEyLzE5XSAyMDEyLTA3LTExICBBbmRyZXcgUGluc2tpICA8YXBp bnNraUBjYXZpdW0uY29tPgogICAgCiAgICAJQnVnICMyOTY0CiAgICAJKiBw b3J0cy9zeXNkZXBzL3VuaXgvc3lzdi9saW51eC9taXBzL3N5cy91c2VyLmgg KFBBR0VfU0hJRlQpOiBEZWxldGUuCiAgICAJKFBBR0VfU0laRSk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