Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2660244pxj; Mon, 10 May 2021 08:01:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfB8JTcQA8moii7Z6m9O0ciJXIJX3ANuNY4IHjdAGPXGP7hoOupGjOhz7ouxaVCHsXaV2o X-Received: by 2002:a50:ee88:: with SMTP id f8mr29406200edr.176.1620658871668; Mon, 10 May 2021 08:01:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620658871; cv=none; d=google.com; s=arc-20160816; b=zLThfhPDBBSRTRo0jYO97Ics+FM2kM6GGEsbraMGPvNX5l7C19GaciB6lsQgmYGvMn 1yTL+C5iKnwUI3QtWcgWLbg4z6dNsRjt+YKEnEtcGgDYTiiB9nOdouYB8bI7Sf8BLdpC QNr0YkZDaHKIkdi/SSN/NWgQCbapV8Co/Tf2kCDoPj7RpqIy3l2BwI+bq1Fg2PJBYnGr jTZEkojXqO8WSnMzwgLAwocmCiLQKd730zpECoI8FTAQF/3QpUCWyaw0tcYd7KfcHV/x QRGxmEVW7agY+ejJ7Rqm53umo66EYNPbmE6XC9mhyXqbdFnIq9qX+1nVBEF0NtPxsq3b V56Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=o+8tKsgDNDFz7S1ok6aP7f6KLFsdnv3nvcRB1WhD94Q=; b=F5mvw4soQV86cDKh2pLx9Z6Cwg+voje+qX2bD+gppCXKdluPNuewTMjWA30M8tgz5H ibI55cHt2+z9qDsvVbsdg5CJTy8T4nj0uUnCm6mkRhdFOFcCgiMv92H8prdEUK9YSwNH fU2kKU48yAnObEIulmZfx5yX5elOlUlpNZVFS35HKE6SblCKk8NapagYNq2nHkklwEJL B/+n2+nRNUVVWpUSU4dpaRzHvK32V5j2WpOQQbg+pGmQbyQ/sx/uG1fvirH3cGUFB2nE 4Zd/mwdjMEN624KtTYbNenA9ly+N9mnnTuwzSEMkCV6aww2VofwZCnjv9W53rRPzoATh 7edg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w24si15802399ejb.528.2021.05.10.08.00.46; Mon, 10 May 2021 08:01:11 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235823AbhEJPAf (ORCPT + 99 others); Mon, 10 May 2021 11:00:35 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:33515 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234334AbhEJO6J (ORCPT ); Mon, 10 May 2021 10:58:09 -0400 Received: from mail-wr1-f42.google.com ([209.85.221.42]) by mrelayeu.kundenserver.de (mreue108 [213.165.67.113]) with ESMTPSA (Nemesis) id 1N9Mh8-1lU8su1wGq-015MkI for ; Mon, 10 May 2021 16:56:56 +0200 Received: by mail-wr1-f42.google.com with SMTP id a4so16965461wrr.2 for ; Mon, 10 May 2021 07:56:56 -0700 (PDT) X-Gm-Message-State: AOAM532Ju+NLboerowGgvzrUmtF/VD4iRZFpdTGPE6/ZHF4eUZTJPvIO HTbvTkCqgYLYifjIwQp3bFWI9e8mrjeVB4VMbSA= X-Received: by 2002:a5d:4452:: with SMTP id x18mr32127556wrr.286.1620658616195; Mon, 10 May 2021 07:56:56 -0700 (PDT) MIME-Version: 1.0 References: <20210510093753.40683-1-mark.rutland@arm.com> In-Reply-To: <20210510093753.40683-1-mark.rutland@arm.com> From: Arnd Bergmann Date: Mon, 10 May 2021 16:56:03 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 00/33] locking/atomic: convert all architectures to ARCH_ATOMIC To: Mark Rutland Cc: Linux Kernel Mailing List , Will Deacon , Boqun Feng , Peter Zijlstra , 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 Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:f+TJbClpnUzvyohwXNw7YAK6C2y3NUvZhrdoN8WDgL6aSfRCsPc HOodKFCtHEYlsFNozHwEeTo5JCn7xUBl/Ha2bMcKYYDwXVfdhhytmtxRmIeG0hBgXranGXk XIhKmX4+KQLQBTOfn/mLhpv7Xlbov4QGKdn9TsyzTUHy1gYhANSE/mxyEuFHitdx/+JTyQF soetJv5k9kg4MOxT9jDdQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:fH2mYd4u7w8=:g296hBbgzmrVqQWl7UTr1m MXc8KS03jeTqWBRtynDPtQ1EOukMbWP0LxaTiBlc9QQ0P8uUxmOZA1DBK6a93p89bjWcAnala ncX5TqXD47gwcOvW59j1WrVR06slmFBCN2yMY8k3BqffaaX6GogMIXnxUX+0Csy7ovz5Fw7cQ gnAQInBWDL1wCsA6D20fQP8Jh4d+LVr05/A8+EMudk0m7C8wQh3wQVLoOGtrU7cnirKX1OLZr tkfXBD4uryxQl8ilJFl3LE2iaaq2x5Oxl2hdtlMZKAYhrespJFIRAr/Hx66j7b6+ftU+Ivch8 GEta80O+AhmYzBly0AhxJbW7x437T+6yuHZYvxMgZgJehZ3nUw+Uec04DNb3cq3HfKalAE1zF Cv+eY8QhZUGEaLywfgJLwichOWpxo/k3WqISXkkR5yEg1rzL5APA6tWK3RV0jvWDDpRPRYo5k IUWppY+wXz/czfWWRJhKwqMSDEkDowl2jpq84Z1Eh3ZuSJVflD37bQtUyqXs2LwrH99XN4m4z Gpcx1G/SJ5e3z2ijSt9Fco/GTgV8keoZRkVMbiKBVbEVzNoIyKxqo+ODrwqqeKrEGYCeWvgRS 1H3xRs9nGA35jLBYIFjV+RZlUar/dQfYAFi7aKhNeL1fh0LArwwD+JrDaB1L7xS0K8YaNYdp6 S3Jw= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. I'm happy to put this into the asm-generic tree once you have collected enough Acks. Arnd