diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-08-12 12:44:30 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-08-12 12:44:30 +0300 |
commit | f52609fdabb1c726f8b9fdf64df3161781aa186e (patch) | |
tree | 3b7d4a47505eddb097bab848a8ffdc4bbbf79bb7 /include/asm-generic | |
parent | 20f9ed1568c00bbd9e6af31341d25e06bc3d4a16 (diff) | |
parent | 41b9e9fcc1c44b84a785115058ce9c703e3fca6e (diff) | |
download | linux-f52609fdabb1c726f8b9fdf64df3161781aa186e.tar.xz |
Merge branch 'locking/arch-atomic' into locking/core, because it's ready for upstream
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/atomic.h | 11 | ||||
-rw-r--r-- | include/asm-generic/atomic64.h | 4 |
2 files changed, 10 insertions, 5 deletions
diff --git a/include/asm-generic/atomic.h b/include/asm-generic/atomic.h index 1973ad2b13f4..d4d7e337fdcb 100644 --- a/include/asm-generic/atomic.h +++ b/include/asm-generic/atomic.h @@ -98,15 +98,16 @@ ATOMIC_OP_RETURN(add, +) ATOMIC_OP_RETURN(sub, -) #endif -#ifndef atomic_clear_mask +#ifndef atomic_and ATOMIC_OP(and, &) -#define atomic_clear_mask(i, v) atomic_and(~(i), (v)) #endif -#ifndef atomic_set_mask -#define CONFIG_ARCH_HAS_ATOMIC_OR +#ifndef atomic_or ATOMIC_OP(or, |) -#define atomic_set_mask(i, v) atomic_or((i), (v)) +#endif + +#ifndef atomic_xor +ATOMIC_OP(xor, ^) #endif #undef ATOMIC_OP_RETURN diff --git a/include/asm-generic/atomic64.h b/include/asm-generic/atomic64.h index 30ad9c86cebb..d48e78ccad3d 100644 --- a/include/asm-generic/atomic64.h +++ b/include/asm-generic/atomic64.h @@ -32,6 +32,10 @@ extern long long atomic64_##op##_return(long long a, atomic64_t *v); ATOMIC64_OPS(add) ATOMIC64_OPS(sub) +ATOMIC64_OP(and) +ATOMIC64_OP(or) +ATOMIC64_OP(xor) + #undef ATOMIC64_OPS #undef ATOMIC64_OP_RETURN #undef ATOMIC64_OP |