[arm-perf:for-joerg/arm-smmu/updates 10/13] include/linux/atomic.h:475:29: error: implicit declaration of function 'cmpxchg64'

From: kbuild test robot
Date: Fri Jun 23 2017 - 02:05:19 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git for-joerg/arm-smmu/updates
head: 5723c883174667dab5c42cbefa8d4d0e9acc16bc
commit: a22753392d403aba096a3b10b2bc6ed721a2eb8f [10/13] iommu/io-pgtable-arm: Support lockless operation
config: m32r-allyesconfig (attached as .config)
compiler: m32r-linux-gcc (GCC) 6.2.0
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout a22753392d403aba096a3b10b2bc6ed721a2eb8f
# save the attached .config to linux build tree
make.cross ARCH=m32r

All error/warnings (new ones prefixed by >>):

In file included from drivers/iommu/io-pgtable-arm.c:23:0:
drivers/iommu/io-pgtable-arm.c: In function 'arm_lpae_install_table':
>> include/linux/atomic.h:475:29: error: implicit declaration of function 'cmpxchg64' [-Werror=implicit-function-declaration]
#define cmpxchg64_relaxed cmpxchg64
^
>> drivers/iommu/io-pgtable-arm.c:337:8: note: in expansion of macro 'cmpxchg64_relaxed'
old = cmpxchg64_relaxed(ptep, curr, new);
^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from drivers//iommu/io-pgtable-arm.c:23:0:
drivers//iommu/io-pgtable-arm.c: In function 'arm_lpae_install_table':
>> include/linux/atomic.h:475:29: error: implicit declaration of function 'cmpxchg64' [-Werror=implicit-function-declaration]
#define cmpxchg64_relaxed cmpxchg64
^
drivers//iommu/io-pgtable-arm.c:337:8: note: in expansion of macro 'cmpxchg64_relaxed'
old = cmpxchg64_relaxed(ptep, curr, new);
^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

vim +/cmpxchg64 +475 include/linux/atomic.h

654672d4 Will Deacon 2015-08-06 469 __atomic_op_fence(cmpxchg, __VA_ARGS__)
654672d4 Will Deacon 2015-08-06 470 #endif
654672d4 Will Deacon 2015-08-06 471 #endif /* cmpxchg_relaxed */
654672d4 Will Deacon 2015-08-06 472
654672d4 Will Deacon 2015-08-06 473 /* cmpxchg64_relaxed */
654672d4 Will Deacon 2015-08-06 474 #ifndef cmpxchg64_relaxed
654672d4 Will Deacon 2015-08-06 @475 #define cmpxchg64_relaxed cmpxchg64
654672d4 Will Deacon 2015-08-06 476 #define cmpxchg64_acquire cmpxchg64
654672d4 Will Deacon 2015-08-06 477 #define cmpxchg64_release cmpxchg64
654672d4 Will Deacon 2015-08-06 478

:::::: The code at line 475 was first introduced by commit
:::::: 654672d4ba1a6001c365833be895f9477c4d5eab locking/atomics: Add _{acquire|release|relaxed}() variants of some atomic operations

:::::: TO: Will Deacon <will.deacon@xxxxxxx>
:::::: CC: Ingo Molnar <mingo@xxxxxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation