Re: [PATCH 00/33] locking/atomic: convert all architectures to ARCH_ATOMIC

From: Arnd Bergmann
Date: Mon May 10 2021 - 10:59:49 EST


On Mon, May 10, 2021 at 11:39 AM Mark Rutland <mark.rutland@xxxxxxx> 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