[PATCH -next] m68k: Add missing cmpxchg64() if CONFIG_RMW_INSNS=y

From: Geert Uytterhoeven
Date: Thu Mar 14 2013 - 15:31:06 EST


If CONFIG_RMW_INSNS=y:

drivers/block/blockconsole.c: In function âbcon_advance_console_bytesâ:
drivers/block/blockconsole.c:164: error: implicit declaration of function âcmpxchg64â

Map cmpxchg64 to cmpxchg64_local, which is already mapped to
__cmpxchg64_local_generic, just like for the CONFIG_RMW_INSNS=n case.

Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
---
http://kisskb.ellerman.id.au/kisskb/buildresult/8398995/

arch/m68k/include/asm/cmpxchg.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/m68k/include/asm/cmpxchg.h b/arch/m68k/include/asm/cmpxchg.h
index 5c81d0e..bc755bc 100644
--- a/arch/m68k/include/asm/cmpxchg.h
+++ b/arch/m68k/include/asm/cmpxchg.h
@@ -124,6 +124,9 @@ static inline unsigned long __cmpxchg(volatile void *p, unsigned long old,
#define cmpxchg_local(ptr, o, n) \
((__typeof__(*(ptr)))__cmpxchg((ptr), (unsigned long)(o), \
(unsigned long)(n), sizeof(*(ptr))))
+
+#define cmpxchg64(ptr, o, n) cmpxchg64_local((ptr), (o), (n))
+
#else

/*
--
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/