Re: [PATCH v3 3/3] mm/armv6: work around armv6 cmpxchg support issue
From: Alex Shi
Date: Thu Sep 03 2020 - 02:47:27 EST
在 2020/9/1 下午9:17, Matthew Wilcox 写道:
> On Tue, Sep 01, 2020 at 02:30:51PM +0800, Alex Shi wrote:
>> seems there are couples archs can not do cmpxchg1
>> So update the patch here. And it's easy to fix if more arch issue find here.
>
>> +/*
>> + * cmpxchg only support 32-bits operands on the following archs ARMv6, SPARC32
>> + * sh2, XTENSA.
>> + */
>> +#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_SH2) || \
>> + defined(CONFIG_SPARC32) || defined(CONFIG_XTENSA)
>
> Looks like we need a HAVE_CMPXCHG_BYTE in Kconfig to parallel
> HAVE_CMPXCHG_DOUBLE.
>
Thanks for reminder! Compare the HAVE_CMPXCHG_BYTE, NO_CMPXCHG_BYTE would be
better for less code change.
I will send the v4 for a bit more change on patch 2.
Thanks!
Alex