From patchwork Sun Jan 25 21:51:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 4814 Received: (qmail 29613 invoked by alias); 25 Jan 2015 21:53:34 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 28625 invoked by uid 89); 25 Jan 2015 21:52:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pd0-f169.google.com X-Received: by 10.68.135.136 with SMTP id ps8mr29601229pbb.130.1422222712167; Sun, 25 Jan 2015 13:51:52 -0800 (PST) Date: Sun, 25 Jan 2015 13:51:50 -0800 From: "H.J. Lu" To: Chris Metcalf , Torvald Riegel , Carlos O'Donell , GNU C Library , David Miller , Richard Henderson , Mike Frysinger , Andreas Schwab , "Joseph S. Myers" , Kaz Kojima , Thomas Schwinge , Marcus Shawcroft , Chung-Lin Tang , Adhemerval Zanella , Andreas Krebbel Subject: Re: glibc 2.21 - Machine maintainers, please test your machines. Message-ID: <20150125215150.GA15033@gmail.com> References: <54C2BDD7.7000304@redhat.com> <54C3B6D5.3090308@ezchip.com> <1422119595.29655.42.camel@triegel.csb> <54C5094A.8060300@ezchip.com> <54C51D94.6030007@ezchip.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) On Sun, Jan 25, 2015 at 10:12:23AM -0800, H.J. Lu wrote: > On Sun, Jan 25, 2015 at 8:45 AM, Chris Metcalf wrote: > > On 1/25/2015 10:18 AM, Chris Metcalf wrote: > >> > >> I'm now running with the following change, to see if tilegx32 will > >> also pass with it; this implements my suggestion of rounding new_sem to > >> an 8-byte boundary explicitly on ILP32 platforms. > > > > > > With my proposed change, tilegx32 (and tilegx64) pass all the tests. > > Repeated > > here with a suitable ChangeLog. Let me know if this is acceptable to commit > > for 2.21. > > > > 2015-01-25 Chris Metcalf > > > > * sysdeps/nptl/internaltypes.h (to_new_sem): Define. Provides new > > behavior for [__HAVE_64B_ATOMICS && !defined (_LP64)]. > > * nptl/sem_getvalue.c (__new_sem_getvalue): Use to_new_sem. > > * nptl/sem_init.c (__new_sem_init): Likewise. > > * nptl/sem_post.c (__new_sem_post): Likewise. > > * nptl/sem_wait.c (__new_sem_wait): Likewise. > > (__new_sem_trywait): Likewise. > > * nptl/sem_timedwait.c (sem_timedwait): Likewise. > > * nptl/sem_open.c (sem_open): Add comment about to_new_sem. > > > > > > Can you try something similar to siginfo_t in: > > sysdeps/unix/sysv/linux/x86/bits/siginfo.h > > We had a similar problem on x32 before. > > This is for x86. Each target can do something like it if needed. H.J. diff --git a/sysdeps/x86/bits/semaphore.h b/sysdeps/x86/bits/semaphore.h index 18b2b3c..4890e0d 100644 --- a/sysdeps/x86/bits/semaphore.h +++ b/sysdeps/x86/bits/semaphore.h @@ -28,6 +28,11 @@ # define __SIZEOF_SEM_T 16 #endif +#ifdef __x86_64__ +# define __SEM_ALIGN_T long long int +#else +# define __SEM_ALIGN_T long int +#endif /* Value returned if `sem_open' failed. */ #define SEM_FAILED ((sem_t *) 0) @@ -36,5 +41,5 @@ typedef union { char __size[__SIZEOF_SEM_T]; - long int __align; + __SEM_ALIGN_T __align; } sem_t;