From: Chen Gang <gang.chen@asianux.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: "Jörn Engel" <joern@logfs.org>,
"Chris Metcalf" <cmetcalf@tilera.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Linux-Arch <linux-arch@vger.kernel.org>,
"Paul Gortmaker" <paul.gortmaker@windriver.com>
Subject: [PATCH v2] arch: tile: include: asm: add cmpxchg64() definition
Date: Mon, 01 Jul 2013 10:21:51 +0800 [thread overview]
Message-ID: <51D0E7BF.9030206@asianux.com> (raw)
In-Reply-To: <51D0E4B3.6080402@asianux.com>
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>
---
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 276f067..1da5bfb 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 */
--
1.7.7.6
next prev parent reply other threads:[~2013-07-01 2:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-26 4:25 [Suggestion] tile: include: asm: missing "feedback.h" file Chen Gang
2013-06-27 14:16 ` Chris Metcalf
2013-06-28 0:28 ` Chen Gang
2013-06-28 1:51 ` [PATCH] arch: tile: include: asm: add cmpxchg64() definition Chen Gang
2013-06-28 15:09 ` Ralf Baechle
2013-07-01 2:08 ` Chen Gang
2013-07-01 2:21 ` Chen Gang [this message]
2013-07-17 16:46 ` [PATCH v2] " Chris Metcalf
2013-07-18 0:02 ` Chen Gang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51D0E7BF.9030206@asianux.com \
--to=gang.chen@asianux.com \
--cc=cmetcalf@tilera.com \
--cc=joern@logfs.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paul.gortmaker@windriver.com \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome