[PATCH v10 5/9] riscv: implement preemptible this_cpu add_return operations
David Laight
david.laight.linux at gmail.com
Thu Nov 12 04:09:28 PST 2026
On Thu, 12 Nov 2026 18:41:45 +0800
Yunhui Cui <cuiyunhui at bytedance.com> 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
More information about the linux-riscv
mailing list