aboutsummaryrefslogtreecommitdiff
path: root/arch/m68k/include/asm/atomic.h
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@uclinux.org>2011-10-18 15:07:29 +1000
committerGreg Ungerer <gerg@uclinux.org>2011-12-30 10:20:34 +1000
commit83b73d6cb8301df32d9887c16c83490c4fd1f55f (patch)
treeeb2661eb9046976f03561982da442fb1a02fb2ef /arch/m68k/include/asm/atomic.h
parent33d4bcca603c9174c0ee0e312fd3c6da03ff9e15 (diff)
m68k: ColdFire V4e MMU context support code
Add code to manage the context's of the ColdFire V4e MMU. This code is mostly taken from the Freescale 2.6.35 kernel BSP for MMU enabled ColdFire. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Matt Waddel <mwaddel@yahoo.com> Acked-by: Kurt Mahan <kmahan@xmission.com>
Diffstat (limited to 'arch/m68k/include/asm/atomic.h')
-rw-r--r--arch/m68k/include/asm/atomic.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/m68k/include/asm/atomic.h b/arch/m68k/include/asm/atomic.h
index 65c6be6c8180..4eba796c00d4 100644
--- a/arch/m68k/include/asm/atomic.h
+++ b/arch/m68k/include/asm/atomic.h
@@ -55,6 +55,16 @@ static inline int atomic_dec_and_test(atomic_t *v)
return c != 0;
}
+static inline int atomic_dec_and_test_lt(atomic_t *v)
+{
+ char c;
+ __asm__ __volatile__(
+ "subql #1,%1; slt %0"
+ : "=d" (c), "=m" (*v)
+ : "m" (*v));
+ return c != 0;
+}
+
static inline int atomic_inc_and_test(atomic_t *v)
{
char c;