Re: [PATCH v10 5/9] riscv: implement preemptible this_cpu add_return operations
From: David Laight
Date: Thu Nov 12 2026 - 08:13:04 EST
On Thu, 12 Nov 2026 18:41:45 +0800
Yunhui Cui <cuiyunhui@xxxxxxxxxxxxx> wrote:
> Apply the recoverable per-CPU address handling to add-return operations.
>
> Native-width AMOs return the old value, so derive the new value required
> by the percpu API from the operand. Use Zabha for subword operations when
> available, or a masked LR/SC sequence that returns the updated field.
I can't help feeling that some of this code is the same as that for
normal atomic accesses.
Can they me merged?
David