Re: [PATCH v2 04/33] locking/atomic: microblaze: use asm-generic exclusively

From: Michal Simek
Date: Mon May 31 2021 - 08:31:12 EST

On 5/25/21 4:02 PM, Mark Rutland wrote:
> Microblaze provides its own implementation of atomic_dec_if_positive(),
> but nothing else. For a while now, the conditional inc/dec ops have been
> optional, and the core code will provide generic implementations using
> the code templates in scripts/atomic/fallbacks/.
> For simplicity, and for consistency with the other conditional atomic
> ops, let's drop the microblaze implementation of
> atomic_dec_if_positive(), and use the generic implementation.
> With that, we can also drop the local asm/atomic.h and asm/cmpxchg.h
> headers, as asm-generic/atomic.h is mandatory-y, and we can pull in
> asm-generic/cmpxchg.h via generic-y. This matches what nios2 and nds32
> do today.
> There should be no functional change as a result of this patch.
> Signed-off-by: Mark Rutland <mark.rutland@xxxxxxx>
> Cc: Boqun Feng <boqun.feng@xxxxxxxxx>
> Cc: Michal Simek <monstr@xxxxxxxxx>
> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Cc: Will Deacon <will@xxxxxxxxxx>

It is fine based on current code status. I didn't have a time to push
implementation for SMP which will require different handling.

Acked-by: Michal Simek <michal.simek@xxxxxxxxxx>


Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs