[PATCH v4 2/4] riscv: cmpxchg.h: Merge macros

Arnd Bergmann arnd at arndb.de
Sat Mar 27 21:25:12 GMT 2021


On Sat, Mar 27, 2021 at 7:06 PM <guoren at kernel.org> wrote:
>
> From: Guo Ren <guoren at linux.alibaba.com>
>
> To reduce assembly codes, let's merge duplicate codes into one
> (xchg_acquire, xchg_release, cmpxchg_release).
>
> Signed-off-by: Guo Ren <guoren at linux.alibaba.com>

This is a nice cleanup, but I wonder if you can go even further by using
the definitions from atomic-arch-fallback.h like arm64 and x86 do.

        Arnd



More information about the linux-riscv mailing list