From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14158 invoked by alias); 13 Dec 2013 13:15:09 -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 14148 invoked by uid 89); 13 Dec 2013 13:15:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 13 Dec 2013 13:15:04 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1VrSa5-0005wp-ED from Andrew_Stubbs@mentor.com for libc-ports@sourceware.org; Fri, 13 Dec 2013 05:15:01 -0800 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 13 Dec 2013 05:15:01 -0800 Received: from [172.30.88.7] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.2.247.3; Fri, 13 Dec 2013 13:14:59 +0000 Message-ID: <52AB0851.1020909@codesourcery.com> Date: Fri, 13 Dec 2013 13:15:00 -0000 From: Andrew Stubbs User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: "libc-ports@sourceware.org" Subject: [PATCH] Remove PAGE_SIZE et al from sys/user.h Content-Type: multipart/mixed; boundary="------------040302030203050600020200" X-SW-Source: 2013-12/txt/msg00017.txt.bz2 --------------040302030203050600020200 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Content-length: 775 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 --------------040302030203050600020200 Content-Type: text/x-patch; name="glibc-bugzilla-16191.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="glibc-bugzilla-16191.patch" Content-length: 2691 2013-12-12 Andrew Stubbs * stdlib/tst-limits.c: Include sys/user.h. ports/ * sysdeps/unix/sysv/linux/ia64/sys/user.h (NBPG, UPAGES, HOST_TEXT_START_ADDR, HOST_DATA_START_ADDR, HOST_STACK_END_ADDR): Delete macro definitions. * sysdeps/unix/sysv/linux/microblaze/sys/user.h (PAGE_SHIFT, PAGE_SIZE, PAGE_MASK, NBPG, UPAGES, HOST_TEXT_START_ADDR, HOST_STACK_END_ADDR): Delete macro definitions. * sysdeps/unix/sysv/linux/mips/sys/user.h (PAGE_SHIFT, PAGE_SIZE, PAGE_MASK, NBPG, UPAGES, HOST_TEXT_START_ADDR, HOST_DATA_START_ADDR, HOST_STACK_END_ADDR): Delete macro definitions. diff --git a/ports/sysdeps/unix/sysv/linux/ia64/sys/user.h b/ports/sysdeps/unix/sysv/linux/ia64/sys/user.h index 535079a..b703102 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/sys/user.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/sys/user.h @@ -44,10 +44,4 @@ struct user char u_comm[32]; /* User command name. */ }; -#define NBPG PAGE_SIZE -#define UPAGES 1 -#define HOST_TEXT_START_ADDR (u.start_code) -#define HOST_DATA_START_ADDR (u.start_data) -#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) - #endif /* sys/user.h */ diff --git a/ports/sysdeps/unix/sysv/linux/microblaze/sys/user.h b/ports/sysdeps/unix/sysv/linux/microblaze/sys/user.h index a633042..69ab0c6 100644 --- a/ports/sysdeps/unix/sysv/linux/microblaze/sys/user.h +++ b/ports/sysdeps/unix/sysv/linux/microblaze/sys/user.h @@ -66,12 +66,4 @@ struct user int u_debugreg [8]; }; -# define PAGE_SHIFT 12 -# define PAGE_SIZE (1UL << PAGE_SHIFT) -# define PAGE_MASK (~(PAGE_SIZE-1)) -# define NBPG PAGE_SIZE -# define UPAGES 1 -# define HOST_TEXT_START_ADDR (u.start_code) -# define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) - #endif /* _SYS_USER_H */ diff --git a/ports/sysdeps/unix/sysv/linux/mips/sys/user.h b/ports/sysdeps/unix/sysv/linux/mips/sys/user.h index 37fc568..918b14f 100644 --- a/ports/sysdeps/unix/sysv/linux/mips/sys/user.h +++ b/ports/sysdeps/unix/sysv/linux/mips/sys/user.h @@ -206,13 +206,4 @@ struct user { #endif -#define PAGE_SHIFT 12 -#define PAGE_SIZE (1UL << PAGE_SHIFT) -#define PAGE_MASK (~(PAGE_SIZE-1)) -#define NBPG PAGE_SIZE -#define UPAGES 1 -#define HOST_TEXT_START_ADDR (u.start_code) -#define HOST_DATA_START_ADDR (u.start_data) -#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) - #endif /* _SYS_USER_H */ 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 #include +/* For PAGE_SIZE. */ +#include static long long int bitval (int bits) --------------040302030203050600020200--