[patch v3 18/36] [patch V2 18/38] cpu/hotplug: Add CPU state tracking and synchronization
Peter Zijlstra
peterz at infradead.org
Tue May 9 04:07:22 PDT 2023
On Mon, May 08, 2023 at 09:43:55PM +0200, Thomas Gleixner wrote:
> +static inline void cpuhp_ap_update_sync_state(enum cpuhp_sync_state state)
> +{
> + atomic_t *st = this_cpu_ptr(&cpuhp_state.ap_sync_state);
> + int sync = atomic_read(st);
> +
> + while (!atomic_try_cmpxchg(st, &sync, state));
> +}
Why isn't:
atomic_set(st, state);
any good?
More information about the linux-riscv
mailing list