From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cmx-mtlrgo001.bell.net (mta-mtl-001.bell.net [209.71.208.11]) by sourceware.org (Postfix) with ESMTP id 39B543858D33 for ; Thu, 6 Jul 2023 16:01:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 39B543858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=bell.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bell.net X-RG-CM-BuS: 0 X-RG-CM-SC: 0 X-RG-CM: Clean X-Originating-IP: [142.181.186.176] X-RG-Env-Sender: dave.anglin@bell.net X-RG-Rigid: 64A54E670025F514 X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedviedrudelgdelhecutefuodetggdotefrodftvfcurfhrohhfihhlvgemuceugffnnfdpqfgfvfenuceurghilhhouhhtmecufedtudenucenucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomheplfhohhhnucffrghvihguucetnhhglhhinhcuoegurghvvgdrrghnghhlihhnsegsvghllhdrnhgvtheqnecuggftrfgrthhtvghrnhepvdeijeeifeelveeufeeihfelheefudeggeeguefghfdujeelfeeiffejkefhvedunecukfhppedugedvrddukedurddukeeirddujeeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghloheplgduledvrdduieekrddvrdeglegnpdhinhgvthepudegvddrudekuddrudekiedrudejiedpmhgrihhlfhhrohhmpegurghvvgdrrghnghhlihhnsegsvghllhdrnhgvthdpnhgspghrtghpthhtohephedprhgtphhtthhopegurghvvgdrrghnghhlihhnsegsvghllhdrnhgvthdprhgtphhtthhopegurghvvgesphgrrhhishgtqdhlihhnuhigrdhorhhgpdhrtghpthhtohepuggvlhhlvghrsehgmhigrdguvgdprhgtphhtthhopehlihgstgdqrghlphhhrgesshhouhhrtggvfigrrhgvrdhorhhgpdhrtghpthhtohepshgrmhesghgvnhhtohhordhorhhgpdgruhhthhgpuhhsvghrpegurghvvgdrrghnghhlihhnsegsvghllhdrnhgvth X-CM-Envelope: MS4xfLTQmncWAH9vdMj2QtvBHK+FB3RZVcass5kkozH+wdEeKNJu8o2t+copZsnHBh6upzjjpFGbrDxsOX/+BWxDQda8GIxu0sSraU0lqUk1AHrca06W3F6D 2jgkxyVCwWRtN5DjQw1tphoKD8QsNeCx6EIyfre/lax1tYDxfFYL+S6P7SPxMDJjhFvasSmpNoMmXj81xCnXUnCyjmtosH+SKoGCYC6o9SY144zBgcfG3wYL fQ8PjbN2COy78jWsUgETAV7808c6TulnUo9axqbfTMOesQ1Og0HSixEeK+H96MCJgRiNwVXt+JWE76dQP28DH4M3pH+9bgj+fGDB+drknRg= X-RazorGate-Vade-Verdict: clean 0 X-CM-Analysis: v=2.4 cv=W7Nb6Tak c=1 sm=1 tr=0 ts=64a6e54e a=4B+q39mD0Bm0IdZjDiNhQQ==:117 a=4B+q39mD0Bm0IdZjDiNhQQ==:17 a=IkcTkHD0fZMA:10 a=FBHGMhGWAAAA:8 a=HByzGEOeltl9GJGTFowA:9 a=QEXdDO2ut3YA:10 a=9gvnlMMaQFpL9xblJ6ne:22 X-RazorGate-Vade-Classification: clean Received: from [192.168.2.49] (142.181.186.176) by cmx-mtlrgo001.bell.net (5.8.814) (authenticated as dave.anglin@bell.net) id 64A54E670025F514; Thu, 6 Jul 2023 12:01:18 -0400 Message-ID: <668d1c2d-1b02-bea8-d5a7-ea8a044f3f97@bell.net> Date: Thu, 6 Jul 2023 12:01:17 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [committed] hppa: Drop 16-byte pthread lock alignment To: John David Anglin , libc-alpha@sourceware.org Cc: deller@gmx.de, Sam James References: Content-Language: en-US From: John David Anglin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_STATUS,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: After some discussion, I decided it would be best to revert this change for now. Commit 500054974667be3153ed760152ea0153df33c3d0 reverts " hppa: Drop 16-byte pthread lock alignment" (commits c4468cd3995b4236ea886901109b194641132b08 and ab991a3d1b401ded6bd4f027352da8262b021a11). Dave On 2023-03-26 5:22 p.m., John David Anglin wrote: > hppa: Drop 16-byte pthread lock alignment > > Linux threads were removed about 12 years ago and the current > nptl implementation only requires 4-byte alignment for pthread > locks. > > The 16-byte alignment causes various issues. For example in > building ignition-msgs, we have: > > /usr/include/google/protobuf/map.h:124:37: error: static assertion failed > 124 | static_assert(alignof(value_type) <= 8, ""); > | ~~~~~~~~~~~~~~~~~~~~^~~~ > > This is caused by the 16-byte pthread lock alignment. > > Signed-off-by: John David Anglin > --- > > diff --git a/sysdeps/hppa/nptl/bits/pthreadtypes-arch.h b/sysdeps/hppa/nptl/bits/pthreadtypes-arch.h > index 999195c5b0..c1a46d66d0 100644 > --- a/sysdeps/hppa/nptl/bits/pthreadtypes-arch.h > +++ b/sysdeps/hppa/nptl/bits/pthreadtypes-arch.h > @@ -40,7 +40,7 @@ > #define __SIZEOF_PTHREAD_RWLOCK_T 64 > #define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 > > -#define __LOCK_ALIGNMENT __attribute__ ((__aligned__(16))) > +#define __LOCK_ALIGNMENT > #define __ONCE_ALIGNMENT > > #endif /* bits/pthreadtypes.h */ > diff --git a/sysdeps/hppa/nptl/bits/struct_rwlock.h b/sysdeps/hppa/nptl/bits/struct_rwlock.h > index e83b4aab52..59bc9fe76f 100644 > --- a/sysdeps/hppa/nptl/bits/struct_rwlock.h > +++ b/sysdeps/hppa/nptl/bits/struct_rwlock.h > @@ -25,8 +25,14 @@ struct __pthread_rwlock_arch_t > /* In the old Linuxthreads pthread_rwlock_t, this is the > start of the 4-word 16-byte aligned lock structure. The > next four words are all set to 1 by the Linuxthreads > - PTHREAD_RWLOCK_INITIALIZER. We ignore them in NPTL. */ > - int __compat_padding[4] __attribute__ ((__aligned__(16))); > + PTHREAD_RWLOCK_INITIALIZER. We ignore them in NPTL. > + > + The 16-byte aligned lock stucture causes various pthread > + structures to be over aligned. This causes some builds > + to fail which assume a maximum alignment of 8 bytes. > + Linuxthreads has been removed for 12 years, so drop > + alignment of lock structure. */ > + int __compat_padding[4]; > unsigned int __readers; > unsigned int __writers; > unsigned int __wrphase_futex; -- John David Anglin dave.anglin@bell.net