[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180521171652.3021-2-bart.vanassche@wdc.com>
Date: Mon, 21 May 2018 10:16:51 -0700
From: Bart Van Assche <bart.vanassche@....com>
To: Jens Axboe <axboe@...nel.dk>
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
Christoph Hellwig <hch@....de>,
Bart Van Assche <bart.vanassche@....com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
Russell King <linux@...linux.org.uk>
Subject: [PATCH v12 1/2] ARM: cmpxchg64: Only define cmpxchg64() if not using the Thumb instruction set
Since the implementation of cmpxchg64() uses instructions that are not
Thumb instructions, only define cmpxchg64() if not building in Thumb
mode. This patch allows the next patch in this series to check for
cmpxchg64() support using #if defined(cmpxchg64).
Signed-off-by: Bart Van Assche <bart.vanassche@....com>
Cc: Catalin Marinas <catalin.marinas@....com>
Cc: Will Deacon <will.deacon@....com>
Cc: Russell King <linux@...linux.org.uk>
---
arch/arm/include/asm/cmpxchg.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/include/asm/cmpxchg.h b/arch/arm/include/asm/cmpxchg.h
index 8b701f8e175c..41ab99bc04ca 100644
--- a/arch/arm/include/asm/cmpxchg.h
+++ b/arch/arm/include/asm/cmpxchg.h
@@ -141,7 +141,9 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
sizeof(*(ptr))); \
})
+#ifndef CONFIG_THUMB2_KERNEL
#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
+#endif /* CONFIG_THUMB2_KERNEL */
#include <asm-generic/cmpxchg.h>
@@ -241,6 +243,7 @@ static inline unsigned long __cmpxchg_local(volatile void *ptr,
sizeof(*(ptr))); \
})
+#ifndef CONFIG_THUMB2_KERNEL
static inline unsigned long long __cmpxchg64(unsigned long long *ptr,
unsigned long long old,
unsigned long long new)
@@ -273,6 +276,7 @@ static inline unsigned long long __cmpxchg64(unsigned long long *ptr,
})
#define cmpxchg64_local(ptr, o, n) cmpxchg64_relaxed((ptr), (o), (n))
+#endif /* CONFIG_THUMB2_KERNEL */
#endif /* __LINUX_ARM_ARCH__ >= 6 */
--
2.16.3
Powered by blists - more mailing lists