From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CBA7C54EBC for ; Wed, 4 Jan 2023 11:36:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C34008E0002; Wed, 4 Jan 2023 06:36:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BBA138E0001; Wed, 4 Jan 2023 06:36:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A814B8E0002; Wed, 4 Jan 2023 06:36:30 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 957358E0001 for ; Wed, 4 Jan 2023 06:36:30 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 5AF14120ADC for ; Wed, 4 Jan 2023 11:36:30 +0000 (UTC) X-FDA: 80316913740.05.FBFF054 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf17.hostedemail.com (Postfix) with ESMTP id C9A3040010 for ; Wed, 4 Jan 2023 11:36:27 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf17.hostedemail.com: domain of mark.rutland@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=mark.rutland@arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1672832188; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=X40TKI2+8K6loMY8MrrgKkJvenOtlfdQI75V+9EpXyY=; b=hcyhGXXJa2bLjO3rRtPeu3LTLuwn0tSeymaBcklf4LOmDCCOSxs96ime9IQ2hqlMNgXi9J KYrK34XkJNe2Cz0ZlrWPdCC+sKQOPd3ahyhgbc6zazUlZTv7RB7c0OLpfbIGyMG2mWAO1Z 7Ey3bK9MdTBH4X1bDiy2LMdaH6YIDW0= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf17.hostedemail.com: domain of mark.rutland@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=mark.rutland@arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1672832188; a=rsa-sha256; cv=none; b=zshfpG5Io3M7uo2NpA8gyz0Luh/5ANkpGKtZAxy9y3RDSaA9KEviI0Ay981IkgHZgeVs7a fUiW2EcdQIi2xJlh5ADOyVVRmAbJtQ0GPqr8q5EGk1yW5mfzqcpXaSRS+jnQYXKMVSGEya 7+YMcD8JgdPtyZC1Vqutv+Mk54CDUtY= 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 4F7021042; Wed, 4 Jan 2023 03:37:08 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.37.146]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D24573F587; Wed, 4 Jan 2023 03:36:20 -0800 (PST) Date: Wed, 4 Jan 2023 11:36:18 +0000 From: Mark Rutland To: Arnd Bergmann Cc: Peter Zijlstra , Boqun Feng , Linus Torvalds , Jonathan Corbet , Will Deacon , Catalin Marinas , dennis@kernel.org, Tejun Heo , Christoph Lameter , Heiko Carstens , gor@linux.ibm.com, Alexander Gordeev , borntraeger@linux.ibm.com, svens@linux.ibm.com, Herbert Xu , "David S . Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , joro@8bytes.org, suravee.suthikulpanit@amd.com, Robin Murphy , dwmw2@infradead.org, baolu.lu@linux.intel.com, Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Vlastimil Babka , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-s390@vger.kernel.org, linux-crypto@vger.kernel.org, iommu@lists.linux.dev, Linux-Arch Subject: Re: [RFC][PATCH 05/12] arch: Introduce arch_{,try_}_cmpxchg128{,_local}() Message-ID: References: <20221219153525.632521981@infradead.org> <20221219154119.154045458@infradead.org> <8fea3494-1d1f-4f64-b525-279152cf430b@app.fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8fea3494-1d1f-4f64-b525-279152cf430b@app.fastmail.com> X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: C9A3040010 X-Rspam-User: X-Stat-Signature: g1kc7biztxwgixafkcij57t85n8kfzxx X-HE-Tag: 1672832187-847641 X-HE-Meta: U2FsdGVkX1/8rRtkIRk0i+FLnhqmolcAkf6vPCcob66h0QD3d1BDHm5pAajT/lxzAWlgSj4PuPm4X6HlY15bc9ZCjF40Qxk0Y2tzS04MvglCo3mQ2oWIZAFDcxD0+Y31hHA9PF34Z0shSgN5uxETt784nzEJ3a9MCLCWSYcKvaIkGwIPXtwfPxCkhJ3Re9u0UikSA1b9KsnyjtrcQqYz5MdmdqsT/61n/0ZL2hk7mM0yDET5gi8UWZJ4tqxSo3xepdkSGe3fBYO5N9zaGkaWuOIaa1A2qyhJVq5g2UfjDYkv19u+Q0NBvPwRzP+NfNpR367C4iNhb8OH0T4Csg66sPrtKlU/W6+drGrlJl/+ODI4pPV2YbT+g0opKdHR/AqlNWxfR923O+5hMcqHhG/OD8kQsDixt+CSxqr6AKrHNNfZr39u5qfvNOfDIJC0JqVoyuY3tjubiRm3eEjvwT2dJ5jgXDBCJFO7uh4qc3F+tsiQl50ZXyvItKi/Uc170DG9LSmZqrXb6aKzuGFObfKvz7IxwTUQQpkJQA7feNVS+sw4V4Jm4pbrHi9IAO2v+47TGd+tuwdNiiBa27iwkKvTXHpZhhav8+y9n/qCkWoeUN7Izfq6aruq46W5uxSw9QTVKy+4QtiN5UWf5g96FDCIUbPmOp/89mEzD3DVhgHE9Ks4opTAonimsfHRxLvJ3FHReqL1iG+EvfDarhuWL75IZvFioOD6n1kfrm2iYzHGuVw7C58vKTUNLr35ge5BHpv+6xDEW5uZdgRkw7Y3+tEMzdSDDbf1ypzqk88lph04HYbXUS1LonA8QLyXP1X24iknjCNPOhqwAeKJfYRISgMJF8O3lThKuS5W+oYkbp4rtHMa9kUboNTGM1Cqm6m/VhxP9bZo5VZiN7HuZ4dgup12GY9MIwV7/CcVRzkyIca2tqL+zWa7FT/b4kYx/me2bs/i X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Jan 03, 2023 at 05:50:00PM +0100, Arnd Bergmann wrote: > On Tue, Jan 3, 2023, at 17:19, Mark Rutland wrote: > > On Tue, Jan 03, 2023 at 02:03:37PM +0000, Mark Rutland wrote: > >> On Tue, Jan 03, 2023 at 01:25:35PM +0000, Mark Rutland wrote: > >> > On Tue, Dec 20, 2022 at 12:08:16PM +0100, Peter Zijlstra wrote: > > >> ... makes GCC much happier: > > > >> ... I'll go check whether clang is happy with that, and how far back that can > >> go, otherwise we'll need to blat the high half with a separate constaint that > >> (ideally) doesn't end up allocating a pointless address register. > > > > Hmm... from the commit history it looks like GCC prior to 5.1 might not be > > happy with that, but that *might* just be if we actually do arithmetic on the > > value, and we might be ok just using it for memroy effects. I can't currently > > get such an old GCC to run on my machines so I haven't been able to check. > > gcc-5.1 is the oldest (barely) supported compiler, the minimum was > last raised from gcc-4.9 in linux-5.15. If only gcc-4.9 and older are > affected, we're good on mainline but may still want a fix for stable > kernels. Yup; I just wanted something that would easily backport to stable, at least as far as linux-4.9.y (where I couldn't find the minimum GCC version when I looked yesterday). > I checked that the cross-compiler binaries from [1] still work, but I noticed > that this version is missing the native aarch64-to-aarch64 compiler (x86 to > aarch64 and vice versa are there), and you need to install libmpfr4 [2] > as a dependency. The newer compilers (6.5.0 and up) don't have these problems. I was trying the old kernel.org crosstool binaries, but I was either missing a library (or I have an incompatible version) on my x86_64 host. I'll have another look today -- thanks for the pointers! Mark. > Arnd > > [1] https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/arm64/5.5.0/ > [2] http://ftp.uk.debian.org/debian/pool/main/m/mpfr4/libmpfr4_3.1.5-1_arm64.deb