Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3352945pxj; Tue, 11 May 2021 02:30:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyof6s1gtOaGT2Mb32Q6pwdmr+2yyw2SbdiFNoKNlPR3vPykisSC630zzCU94T4X1AQuKHQ X-Received: by 2002:a05:6402:2714:: with SMTP id y20mr34708688edd.348.1620725432354; Tue, 11 May 2021 02:30:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620725432; cv=none; d=google.com; s=arc-20160816; b=m9DrGzVk3DHjVZMXs4I8g4pXUTGZZI37qcRYU2OUMznE6UIqMUSRS/1e8QqZvttsE1 FPZr7t4rWFBGCheEGOlywzStI7TVqGGTLJVlOTmZfmyD+A0bo2qPnzZmHjh3fuG9GiyJ Pyd7RzqJQIm6pUu3LSnTA0r+h8II6350+IsnA5rjo0Vfs//TC3bMUu/IA30hUGSovHO3 KdsaPuE5RGnj6G9wfWIt2GQ/bpPqwnEXBmirMLqWNlnylCjM1sKLxSi3pCi5wx16dlmh a+mGMOFK+KkWqqBHLH4Vxy4wGTjqoKce/EMgwlfJOHCY+o65L5zmHCoiNDIw6F/sxNd2 D3uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=NNAsw/1JNV3vW+40GyzK4+/ADivXWYS2igTJIZan+T8=; b=atF/M5miRSPKQ3qM+s45WZIffypBdbfZrQ/Cx7rJI6ZWs3EIj47jiXJYHnZ9jTWWi5 tS3Ddm8ztfg1Bl+Olis+D11ezsicupzAGapAqIBwrKyPEBxNR4kB3HxBjGTycvya3E8G weHH3GYdQhKucWxhKaZLCwRq5ALd/jjjwHPQ41zrFUh/ryj88M36qVEr5fquMc75UccA shny/aeVR9/MEHequfRXoHgBh2iiWyvGvoWTfyJUIyW7W6emjR2/+ngLbo1Jt8UFncQZ +uqI3J6z/CTa8p8LrL088KkvIfqHRI/9xMIKnwjS3+U7/ki14Afac/uiM3k2VXEgqYi0 B9ig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r1si15160467edp.303.2021.05.11.02.30.08; Tue, 11 May 2021 02:30:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231312AbhEKJ2U (ORCPT + 99 others); Tue, 11 May 2021 05:28:20 -0400 Received: from foss.arm.com ([217.140.110.172]:43660 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231302AbhEKJ2T (ORCPT ); Tue, 11 May 2021 05:28:19 -0400 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 E321F1691; Tue, 11 May 2021 02:27:12 -0700 (PDT) Received: from C02TD0UTHF1T.local (unknown [10.57.29.91]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CF9563F719; Tue, 11 May 2021 02:27:05 -0700 (PDT) Date: Tue, 11 May 2021 10:27:01 +0100 From: Mark Rutland To: Arnd Bergmann , Peter Zijlstra Cc: Linux Kernel Mailing List , Will Deacon , Boqun Feng , Albert Ou , Brian Cain , Benjamin Herrenschmidt , Chris Zankel , Rich Felker , David Miller , Vincent Chen , Helge Deller , Geert Uytterhoeven , Greentime Hu , Guo Ren , Ivan Kokshaysky , James Bottomley , Max Filippov , Jonas Bonn , Ley Foon Tan , Russell King - ARM Linux , Matt Turner , Michal Simek , Michael Ellerman , Nick Hu , Palmer Dabbelt , Paul Mackerras , Paul Walmsley , Richard Henderson , Stafford Horne , Stefan Kristiansson , Thomas Bogendoerfer , Vineet Gupta , Yoshinori Sato Subject: Re: [PATCH 00/33] locking/atomic: convert all architectures to ARCH_ATOMIC Message-ID: <20210511092701.GB6152@C02TD0UTHF1T.local> References: <20210510093753.40683-1-mark.rutland@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 10, 2021 at 04:56:03PM +0200, Arnd Bergmann wrote: > On Mon, May 10, 2021 at 11:39 AM Mark Rutland wrote: > > > > This series (based on v5.13-rc1) converts all architectures to > > ARCH_ATOMIC. This will allow the use of instrumented atomics on all > > architectures (e.g. for KASAN and similar), and simplifies the core > > atomic code (which should allow for easier rework of the fallbacks and > > other bits in future). > > > > The series is split into three parts: > > > > 1) Some preparatory work is done to prepare architectures and common > > code for the conversion. In this phase h8300 and microblaze are > > converted to use the asm-generic atomics exclusively, and the > > asm-generic implementations are made to function with or without > > ARCH_ATOMIC. > > > > 2) Architectures are converted one-by-one to use the ARCH_ATOMIC > > interface. I've converted each architecture with its own patch (even > > where the conversion is trivial) to make review and bisection easier. > > > > 3) The code handling !ARCH_ATOMIC is removed. > > > > Note: I've generated the patches with: > > > > git format-patch -C -M -D > > > > ... so the preimage of include/linux/atomic-fallback.h is not included > > in the diff when it is deleted. > > > > The series can also be found in my atomics/arch-atomic branch on > > kernel.org: > > > > https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/log/?h=atomics/arch-atomic > > git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git atomics/arch-atomic > > Nice work! > > I had recently tried experimented with cleanups around cmpxchg(), > adding fixed-length > versions of that which can be used to implement the atomics with less bloated > preprocessor output. My patches will clearly conflict with your > series, but it seems > that we should do yours first in any case. Ah; sorry for stepping on your toes with this. Simplifying the xchg/cmpxchg glue sounds like a nice cleanup too! > I'm happy to put this into the asm-generic tree once you have > collected enough Acks. Great! Going via asm-generic sounds good to me. The kbuild test robot has found a few issues, so I'll probably have a v2 with those fixed and some acks accumulated. Peter, does that make sense to you, or did you have reasons to want this to go via tip? Thanks, Mark.