Re: [PATCH 4/4] s390/percpu: Implement this_cpu_try_cmpxchg()

From: Alexander Gordeev

Date: Mon Oct 12 2026 - 12:46:39 EST


On Mon, Oct 12, 2026 at 01:42:49PM +0200, Heiko Carstens wrote:
> Provide an s390 specific implementation of this_cpu_try_cmpxchg() for
> the four and eight byte cases, if the compiler supports flag output
> operands.
>
> This variant uses the condition code set by cs/csg, which avoids a
> compare instruction required by the generic variant and generates
> slightly better code.
>
> Signed-off-by: Heiko Carstens <hca@xxxxxxxxxxxxx>
> ---
> arch/s390/include/asm/percpu.h | 39 ++++++++++++++++++++++++++++++++++
> 1 file changed, 39 insertions(+)

Acked-by: Alexander Gordeev <agordeev@xxxxxxxxxxxxx>