Re: [PATCH v2 00/33] locking/atomic: convert all architectures to ARCH_ATOMIC

From: Randy Dunlap
Date: Mon Jun 28 2021 - 18:22:02 EST


On 6/28/21 3:13 PM, Peter Zijlstra wrote:
> On Mon, Jun 28, 2021 at 02:22:15PM -0700, Randy Dunlap wrote:
>> However, something in arch/arc/ did look suspicious so I decided to
>> try an ARC allmodconfig build, where I did see a few errors FYI:
>>
>>
>> CC drivers/iommu/io-pgtable-arm.o
>> In file included from ../include/linux/atomic.h:80,
>> from ../drivers/iommu/io-pgtable-arm.c:12:
>> ../drivers/iommu/io-pgtable-arm.c: In function 'arm_lpae_install_table':
>> ../include/linux/atomic-arch-fallback.h:60:32: error: implicit declaration of function 'arch_cmpxchg64'; did you mean 'arch_cmpxchg'? [-Werror=implicit-function-declaration]
>> 60 | #define arch_cmpxchg64_relaxed arch_cmpxchg64
>> | ^~~~~~~~~~~~~~
>> ../include/asm-generic/atomic-instrumented.h:1261:2: note: in expansion of macro 'arch_cmpxchg64_relaxed'
>> 1261 | arch_cmpxchg64_relaxed(__ai_ptr, __VA_ARGS__); \
>> | ^~~~~~~~~~~~~~~~~~~~~~
>> ../drivers/iommu/io-pgtable-arm.c:320:8: note: in expansion of macro 'cmpxchg64_relaxed'
>> 320 | old = cmpxchg64_relaxed(ptep, curr, new);
>> | ^~~~~~~~~~~~~~~~~
>
> 0day also reported something like that. We found that this was a
> pre-existing error, and Mark's patches only changed the error, it never
> successfully build.
>
> cmpxchg64 is an optional feature for 32bit architectures, one that ARMv7
> does provide, and uses, for it's iommu bits. Building the ARM iommu
> drivers on ARC seem somewhat daft but is a result of that COMPILE_TEST
> config.
>

Yes, I realize it's just a COMPILE_TEST config. Not very interesting IMHO.

Thanks.