From cf3a13d790f9760c4bfcae802aaba80efb3519af Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Mon, 1 Jul 2013 10:21:51 +0800 Subject: arch: tile: include: asm: add cmpxchg64() definition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Need add cmpxchg64(), or will cause compiling issue. Need define it as cmpxchg() only for 64-bit operation, since cmpxchg() can support 8 bytes. The related error (with allmodconfig): drivers/block/blockconsole.c: In function ‘bcon_advance_console_bytes’: drivers/block/blockconsole.c:164:2: error: implicit declaration of function ‘cmpxchg64’ [-Werror=implicit-function-declaration] Signed-off-by: Chen Gang Signed-off-by: Chris Metcalf --- arch/tile/include/asm/cmpxchg.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/tile/include/asm/cmpxchg.h') diff --git a/arch/tile/include/asm/cmpxchg.h b/arch/tile/include/asm/cmpxchg.h index 276f067e3640..1da5bfbd8c61 100644 --- a/arch/tile/include/asm/cmpxchg.h +++ b/arch/tile/include/asm/cmpxchg.h @@ -68,6 +68,12 @@ extern unsigned long __cmpxchg_called_with_bad_pointer(void); #define tas(ptr) (xchg((ptr), 1)) +#define cmpxchg64(ptr, o, n) \ +({ \ + BUILD_BUG_ON(sizeof(*(ptr)) != 8); \ + cmpxchg((ptr), (o), (n)); \ +}) + #endif /* __ASSEMBLY__ */ #endif /* _ASM_TILE_CMPXCHG_H */ -- cgit v1.2.2