summaryrefslogtreecommitdiffstats
path: root/arch/h8300/include/asm
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2018-06-21 14:13:19 +0200
committerIngo Molnar <mingo@kernel.org>2018-06-21 14:25:24 +0200
commit9837559d8eb01ce834e56fc9a567c1d94ebd3698 (patch)
treebb475ca639022bddfc8bbdc9c1b963ab0ff30def /arch/h8300/include/asm
parentatomics/treewide: Make test ops optional (diff)
downloadlinux-9837559d8eb01ce834e56fc9a567c1d94ebd3698.tar.xz
linux-9837559d8eb01ce834e56fc9a567c1d94ebd3698.zip
atomics/treewide: Make unconditional inc/dec ops optional
Many of the inc/dec ops are mandatory, but for most architectures inc/dec are simply trivial wrappers around their corresponding add/sub ops. Let's make all the inc/dec ops optional, so that we can get rid of these boilerplate wrappers. The instrumented atomics are updated accordingly. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Will Deacon <will.deacon@arm.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Palmer Dabbelt <palmer@sifive.com> Cc: Boqun Feng <boqun.feng@gmail.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/lkml/20180621121321.4761-17-mark.rutland@arm.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/h8300/include/asm')
-rw-r--r--arch/h8300/include/asm/atomic.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/arch/h8300/include/asm/atomic.h b/arch/h8300/include/asm/atomic.h
index 8977b5157c8f..c6b6a06231b2 100644
--- a/arch/h8300/include/asm/atomic.h
+++ b/arch/h8300/include/asm/atomic.h
@@ -69,13 +69,6 @@ ATOMIC_OPS(sub, -=)
#undef ATOMIC_OP_RETURN
#undef ATOMIC_OP
-#define atomic_inc_return(v) atomic_add_return(1, v)
-#define atomic_dec_return(v) atomic_sub_return(1, v)
-
-#define atomic_inc(v) (void)atomic_inc_return(v)
-
-#define atomic_dec(v) (void)atomic_dec_return(v)
-
static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
{
int ret;