x86: remove unused atomic_inc_short()
Subsystems (2)
PATCH v3 1/1 x86: remove unused atomic_inc_short()
It is completely unused and implemented only on x86. Remove it.
Signed-off-by Dmitry Vyukov <[email protected]>
Suggested-by Mark Rutland <[email protected]>
Cc Andrey Ryabinin <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Andrew Morton <[email protected]>
--
Changes since v1:
- change Suggested-by to Mark
Changes since v2:
- rebase on tip/locking/core
- drop atomic-instrumented.h changes
--- arch/tile/lib/atomic_asm_32.S | 3 +-- arch/x86/include/asm/atomic.h | 13 ------------- 2 files changed, 1 insertion(+), 15 deletions(-)
arch/tile/lib/atomic_asm_32.S +1 -2
@@ -24,8 +24,7 @@ * has an opportunity to return -EFAULT to the user if needed. * The 64-bit routines just return a "long long" with the value, * since they are only used from kernel space and don't expect to fault. - * Support for 16-bit ops is included in the framework but we don't provide - * any (x86_64 has an atomic_inc_short(), so we might want to some day). + * Support for 16-bit ops is included in the framework but we don't provide any. * * Note that the caller is advised to issue a suitable L1 or L2 * prefetch on the address being manipulated to avoid extra stalls.
arch/x86/include/asm/atomic.h +0 -13
@@ -246,19 +246,6 @@ static __always_inline int __atomic_add_unless(atomic_t *v, int a, int u)return c; } -/** -* atomic_inc_short - increment of a short integer -* @v: pointer to type int -* -* Atomically adds 1 to @v -* Returns the new value of @u -*/ -static __always_inline short int atomic_inc_short(short int *v) -{ - asm(LOCK_PREFIX "addw $1, %0" :"+m" (*v)); -return *v; -} -#ifdef CONFIG_X86_32 # include <asm/atomic64_32.h> #else
Signature · 1 line
2.13.0.219.gdb65acc882-goog
tip-bot for Dmitry Vyukov
merge bot[tip:locking/core] locking/x86: Remove the unused atomic_inc_short() methd
locking/x86: Remove the unused atomic_inc_short() methd
Commit-ID: 31b35f6b4d5285a311e10753f4eb17304326b211 Gitweb: http://git.kernel.org/tip/31b35f6b4d5285a311e10753f4eb17304326b211 Author: Dmitry Vyukov <[email protected]> AuthorDate: Fri, 26 May 2017 19:29:00 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Thu, 8 Jun 2017 10:33:50 +0200
locking/x86: Remove the unused atomic_inc_short() methd
It is completely unused and implemented only on x86. Remove it.
Suggested-by Mark Rutland <[email protected]>
Signed-off-by Dmitry Vyukov <[email protected]>
Signed-off-by Peter Zijlstra (Intel) <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Andrey Ryabinin <[email protected]>
Cc H. Peter Anvin <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Thomas Gleixner <[email protected]>
Signed-off-by Ingo Molnar <[email protected]>
--- arch/tile/lib/atomic_asm_32.S | 3 +-- arch/x86/include/asm/atomic.h | 13 ------------- 2 files changed, 1 insertion(+), 15 deletions(-)
arch/tile/lib/atomic_asm_32.S +1 -2
@@ -24,8 +24,7 @@ * has an opportunity to return -EFAULT to the user if needed. * The 64-bit routines just return a "long long" with the value, * since they are only used from kernel space and don't expect to fault. - * Support for 16-bit ops is included in the framework but we don't provide - * any (x86_64 has an atomic_inc_short(), so we might want to some day). + * Support for 16-bit ops is included in the framework but we don't provide any. * * Note that the caller is advised to issue a suitable L1 or L2 * prefetch on the address being manipulated to avoid extra stalls.
arch/x86/include/asm/atomic.h +0 -13
@@ -246,19 +246,6 @@ static __always_inline int __atomic_add_unless(atomic_t *v, int a, int u)return c; } -/** -* atomic_inc_short - increment of a short integer -* @v: pointer to type int -* -* Atomically adds 1 to @v -* Returns the new value of @u -*/ -static __always_inline short int atomic_inc_short(short int *v) -{ - asm(LOCK_PREFIX "addw $1, %0" :"+m" (*v)); -return *v; -} -#ifdef CONFIG_X86_32 # include <asm/atomic64_32.h> #else