diff options
author | Greg Ungerer <gerg@uclinux.org> | 2011-10-18 07:07:29 +0200 |
---|---|---|
committer | Greg Ungerer <gerg@uclinux.org> | 2011-12-30 01:20:34 +0100 |
commit | 83b73d6cb8301df32d9887c16c83490c4fd1f55f (patch) | |
tree | eb2661eb9046976f03561982da442fb1a02fb2ef /arch/m68k/include/asm/atomic.h | |
parent | m68k: MMU enabled ColdFire needs 8k ELF alignment (diff) | |
download | linux-83b73d6cb8301df32d9887c16c83490c4fd1f55f.tar.xz linux-83b73d6cb8301df32d9887c16c83490c4fd1f55f.zip |
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.h | 10 |
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; |