diff options
author | Chen Gang <gang.chen@asianux.com> | 2013-06-30 22:21:51 -0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2013-07-17 12:45:38 -0400 |
commit | cf3a13d790f9760c4bfcae802aaba80efb3519af (patch) | |
tree | 0cc53bc904fb2b7439c3f4dfc0919189d4dc2b9a /arch/tile/include/asm/cmpxchg.h | |
parent | ad81f0545ef01ea651886dddac4bef6cec930092 (diff) |
arch: tile: include: asm: add cmpxchg64() definition
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 <gang.chen@asianux.com>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'arch/tile/include/asm/cmpxchg.h')
-rw-r--r-- | arch/tile/include/asm/cmpxchg.h | 6 |
1 files changed, 6 insertions, 0 deletions
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); | |||
68 | 68 | ||
69 | #define tas(ptr) (xchg((ptr), 1)) | 69 | #define tas(ptr) (xchg((ptr), 1)) |
70 | 70 | ||
71 | #define cmpxchg64(ptr, o, n) \ | ||
72 | ({ \ | ||
73 | BUILD_BUG_ON(sizeof(*(ptr)) != 8); \ | ||
74 | cmpxchg((ptr), (o), (n)); \ | ||
75 | }) | ||
76 | |||
71 | #endif /* __ASSEMBLY__ */ | 77 | #endif /* __ASSEMBLY__ */ |
72 | 78 | ||
73 | #endif /* _ASM_TILE_CMPXCHG_H */ | 79 | #endif /* _ASM_TILE_CMPXCHG_H */ |