Skip to contentSkip to conversation

arch: xtensa: include: asm: compiling issue, need cmpxchg64() defined.

PATCH In review Chen Gang 2 participants 3 messages May 27, 2013 – May 28, 2013

Subsystems (2)
lore
Share & tools
lore

Chen Gang

author
#0 lore raw

PATCH 1/1 arch: xtensa: include: asm: compiling issue, need cmpxchg64() defined.

When compiling with 'allmodconfig', some of drivers need cmpxchg64(), xtensa does not supply 64-bit implementation for 'xchg', so use the 'generic' implementation.

e.g. (for next-20130527 tree):
drivers/block/blockconsole.c:164:2: error: implicit declaration of function ‘cmpxchg64’ [-Werror=implicit-function-declaration]

---
 arch/xtensa/include/asm/cmpxchg.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/xtensa/include/asm/cmpxchg.h +1 -0
index d9ab131..370b26f 100644
@@ -93,6 +93,7 @@ static inline unsigned long __cmpxchg_local(volatile void *ptr,
 	((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\
 			(unsigned long)(n), sizeof(*(ptr))))
 #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
+#define cmpxchg64(ptr, o, n)    cmpxchg64_local((ptr), (o), (n))
 
 /*
  * xchg_u32
Signature · 1 line
1.7.7.6
maintainer
#1 lore raw
Quoted 5 lines · Chen Gang

When compiling with 'allmodconfig', some of drivers need cmpxchg64(), xtensa does not supply 64-bit implementation for 'xchg', so use the 'generic' implementation.

Quoted 7 lines

e.g. (for next-20130527 tree):
drivers/block/blockconsole.c:164:2: error: implicit declaration of function ‘cmpxchg64’ [-Werror=implicit-function-declaration]

---
 arch/xtensa/include/asm/cmpxchg.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Taken to the xtensa-fixes tree. Thanks.

-- Max

author
#2 lore raw
Quoted 9 lines · Max Filippov
Quoted 8 lines · Chen Gang

When compiling with 'allmodconfig', some of drivers need cmpxchg64(), xtensa does not supply 64-bit implementation for 'xchg', so use the 'generic' implementation.

e.g. (for next-20130527 tree):
drivers/block/blockconsole.c:164:2: error: implicit declaration of function ‘cmpxchg64’ [-Werror=implicit-function-declaration]

Quoted 7 lines
Quoted 4 lines
---
 arch/xtensa/include/asm/cmpxchg.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Taken to the xtensa-fixes tree. Thanks.

Thank you too.

Signature · 3 lines
Chen Gang

Asianux Corporation