diff mbox

ARM64: kernel: compiling issue, define cmpxchg64 and cmpxchg64_local for outside using.

Message ID 5174C5D9.3060109@asianux.com (mailing list archive)
State New, archived
Headers show

Commit Message

Chen Gang April 22, 2013, 5:08 a.m. UTC
drivers use cmpxchg64, cmpxchg64_local ... to perform 64-bit operation,
  so they can cross 32-bit and 64-bit platforms (it is a standard way).


Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 arch/arm64/include/asm/cmpxchg.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Comments

Catalin Marinas April 23, 2013, 10:48 a.m. UTC | #1
On Mon, Apr 22, 2013 at 06:08:41AM +0100, Chen Gang wrote:
> 
>   drivers use cmpxchg64, cmpxchg64_local ... to perform 64-bit operation,
>   so they can cross 32-bit and 64-bit platforms (it is a standard way).
> 
> 
> Signed-off-by: Chen Gang <gang.chen@asianux.com>

Applied, thanks.
Chen Gang April 23, 2013, 10:54 a.m. UTC | #2
On 2013?04?23? 18:48, Catalin Marinas wrote:
> On Mon, Apr 22, 2013 at 06:08:41AM +0100, Chen Gang wrote:
>> > 
>> >   drivers use cmpxchg64, cmpxchg64_local ... to perform 64-bit operation,
>> >   so they can cross 32-bit and 64-bit platforms (it is a standard way).
>> > 
>> > 
>> > Signed-off-by: Chen Gang <gang.chen@asianux.com>
> Applied, thanks.


Thanks too. I should continue to find and make new patches for arm64.
diff mbox

Patch

diff --git a/arch/arm64/include/asm/cmpxchg.h b/arch/arm64/include/asm/cmpxchg.h
index 968b5cb..8a8ce0e 100644
--- a/arch/arm64/include/asm/cmpxchg.h
+++ b/arch/arm64/include/asm/cmpxchg.h
@@ -170,4 +170,7 @@  static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old,
 				       (unsigned long)(n),		\
 				       sizeof(*(ptr))))
 
+#define cmpxchg64(ptr,o,n)		cmpxchg((ptr),(o),(n))
+#define cmpxchg64_local(ptr,o,n)	cmpxchg_local((ptr),(o),(n))
+
 #endif	/* __ASM_CMPXCHG_H */