From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.5451.1591081748414554752 for ; Tue, 02 Jun 2020 00:09:08 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ard.biesheuvel@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 483A51FB; Tue, 2 Jun 2020 00:09:07 -0700 (PDT) Received: from [192.168.1.69] (unknown [10.37.8.209]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EE9FE3F7D8; Tue, 2 Jun 2020 00:09:05 -0700 (PDT) Subject: Re: [edk2-devel] [PATCH v2] ArmPkg/CompilerIntrinsicsLib: provide atomics intrinsics To: devel@edk2.groups.io, liming.gao@intel.com, Leif Lindholm , Laszlo Ersek Cc: "glin@suse.com" References: <20200520114448.26104-1-ard.biesheuvel@arm.com> <20200521112353.GS1923@vanye> <20200521131644.GT1923@vanye> <059e1db5-8228-63a8-09ab-bb0efcd95176@arm.com> <20200521141615.GU1923@vanye> <036f7682-0903-40aa-3743-6a383b742b88@redhat.com> <20200522105435.GY1923@vanye> From: "Ard Biesheuvel" Message-ID: <060a1b54-89d7-9c2a-8486-908654e7e79b@arm.com> Date: Tue, 2 Jun 2020 09:09:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 6/2/20 2:50 AM, Liming Gao via groups.io wrote: > Ard: > There is no objection to merge this change into the stable tag 202005= . I see this patch has Reviewed-by and Tested-by. Can you update this patch= and merge it today? > > The stable tag will be created on 2020-06-03 (tomorrow). >=20 Merged as #648 > -----Original Message----- > From: Ard Biesheuvel > Sent: 2020=E5=B9=B45=E6=9C=8822=E6=97=A5 21:27 > To: Leif Lindholm ; Laszlo Ersek > Cc: devel@edk2.groups.io; glin@suse.com; Gao, Liming > Subject: Re: [edk2-devel] [PATCH v2] ArmPkg/CompilerIntrinsicsLib: provi= de atomics intrinsics >=20 > On 5/22/20 12:54 PM, Leif Lindholm wrote: >> On Thu, May 21, 2020 at 22:22:58 +0200, Laszlo Ersek wrote: >>> On 05/21/20 16:16, Leif Lindholm wrote: >>> >>>> OK, then I would vote *for* merging the patch regardless. We know >>>> how long some toolchain versions can stick around simply because >>>> they were mentioned in some blog post somewhere that ended up high >>>> in search rankings. >>>> >>>> Once gcc 10.2 is released (and we have verified the problem can be >>>> worked around elsewhere), I guess we could add a note saying "once >>>> all gcc 10.0 and 10.1 toolchains are considered obsolete, this file >>>> can be deleted". >>> >>> I think we can expect all distros that ship gcc-10 to eventually >>> migrate to gcc-10.2+. Until then, this patch should hopefully work. >>> (I'm quite annoyed by having to call the patch "temporary", as it >>> feels very technically impressive.) >>> >>> So I think I agree with Leif, with a small modification to the idea: >>> rather than a *note* saying "back this out once 10.0 and 10.1 have >>> been replaced by 10.2+ in all 'large' distros" >> >> That isn't actually exatly what I meant - I meant properly obsolete as >> in "we are now reasonably certain no one is still using some silly >> ancient cross compiler they checked into their build infrastructure >> years ago". >> >>> , I would suggest filing a *BZ* >>> for the same. And I recommend making the new BZ dependent on >>> TianoCore#2723 (i.e. the present BZ). >> >> But I don't object to that approach. >> >=20 > OK, so i will leave it up to Liming and the stewards to decide whether t= his gets incorporated ino the stable tag or not. If it is, I would like to = fold in the fixup below >=20 > --- a/ArmPkg/Library/CompilerIntrinsicsLib/AArch64/Atomics.S > +++ b/ArmPkg/Library/CompilerIntrinsicsLib/AArch64/Atomics.S > @@ -53,10 +53,10 @@ > 0: ld\a\()xr\s r0_\sz, [x1] > .ifnc \insn, swp > \opc tmp1_\sz, r0_\sz, tmp0_\sz > + st\l\()xr\s w15, tmp1_\sz, [x1] > .else > - \opc tmp1_\sz, tmp0_\sz > + st\l\()xr\s w15, tmp0_\sz, [x1] > .endif > - st\l\()xr\s w15, tmp1_\sz, [x1] > cbnz w15, 0b > ret > fn_end __aarch64_\insn\()\sz\()\model >=20 > to get rid of the redundant 'mov' for the SWP flavor of the atomics help= ers. >=20 >=20 >=20 >=20 >=20