[PATCH v2 5/5] xtensa: Emulate two-byte cmpxchg
Max Filippov
jcmvbkbc at gmail.com
Wed Sep 16 18:32:08 PDT 2026
On Wed, Sep 16, 2026 at 1:02 PM Bradley Morgan <brads at mainlining.org> wrote:
>
> Xtensa has no two-byte atomic compare and swap, so the __cmpxchg()
> switch lets case 2 fall through to __cmpxchg_called_with_bad_pointer(),
> which is declared but never defined, so a two-byte cmpxchg() fails at
> link time. Route case 2 through the new cmpxchg_emu_u16(), which takes
> natural u16 arguments, so the unsigned long old and new narrow at the
> function boundary.
>
> Signed-off-by: Bradley Morgan <brads at mainlining.org>
> ---
> arch/xtensa/include/asm/cmpxchg.h | 1 +
> 1 file changed, 1 insertion(+)
Reviewed-by: Max Filippov <jcmvbkbc at gmail.com>
--
Thanks.
-- Max
More information about the linux-snps-arc
mailing list