linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Vyukov <dvyukov@google.com>
To: mark.rutland@arm.com, peterz@infradead.org, mingo@redhat.com
Cc: akpm@linux-foundation.org, will.deacon@arm.com,
	aryabinin@virtuozzo.com, kasan-dev@googlegroups.com,
	linux-kernel@vger.kernel.org, x86@kernel.org,
	Dmitry Vyukov <dvyukov@google.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: [PATCH 1/8] x86: remove unused atomic_inc_short()
Date: Tue, 28 Mar 2017 18:15:38 +0200	[thread overview]
Message-ID: <8aacc971a30c72b442e87d3f8fc2ac70f281e31d.1490717337.git.dvyukov@google.com> (raw)
In-Reply-To: <cover.1490717337.git.dvyukov@google.com>
In-Reply-To: <cover.1490717337.git.dvyukov@google.com>

It is completely unused and implemented only on x86.
Remove it.

Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
Suggested-by: Mark Rutland <mark.rutland@arm.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Cc: x86@kernel.org
Cc: kasan-dev@googlegroups.com
---
 arch/tile/lib/atomic_asm_32.S |  3 +--
 arch/x86/include/asm/atomic.h | 13 -------------
 2 files changed, 1 insertion(+), 15 deletions(-)

diff --git a/arch/tile/lib/atomic_asm_32.S b/arch/tile/lib/atomic_asm_32.S
index 1a70e6c0f259..94709ab41ed8 100644
--- a/arch/tile/lib/atomic_asm_32.S
+++ b/arch/tile/lib/atomic_asm_32.S
@@ -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.
diff --git a/arch/x86/include/asm/atomic.h b/arch/x86/include/asm/atomic.h
index caa5798c92f4..33380b871463 100644
--- a/arch/x86/include/asm/atomic.h
+++ b/arch/x86/include/asm/atomic.h
@@ -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
-- 
2.12.2.564.g063fe858b8-goog

  reply	other threads:[~2017-03-28 16:16 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28 16:15 [PATCH 0/8] x86, kasan: add KASAN checks to atomic operations Dmitry Vyukov
2017-03-28 16:15 ` Dmitry Vyukov [this message]
2017-03-28 16:15 ` [PATCH 2/8] x86: un-macro-ify atomic ops implementation Dmitry Vyukov
2017-03-28 16:15 ` [PATCH 3/8] x86: use long long for 64-bit atomic ops Dmitry Vyukov
2017-03-28 21:32   ` Matthew Wilcox
2017-05-26 19:29     ` Dmitry Vyukov
2017-03-28 16:15 ` [PATCH 4/8] asm-generic: add atomic-instrumented.h Dmitry Vyukov
2017-03-28 21:35   ` Matthew Wilcox
2017-03-29  8:21     ` Dmitry Vyukov
2017-03-29 13:27     ` Mark Rutland
2017-03-29 17:15   ` Mark Rutland
2017-03-30  6:43     ` Ingo Molnar
2017-03-30 10:40       ` Mark Rutland
2017-03-28 16:15 ` [PATCH 5/8] x86: switch atomic.h to use atomic-instrumented.h Dmitry Vyukov
2017-03-28 16:25   ` Dmitry Vyukov
2017-03-29 13:37     ` Mark Rutland
2017-05-26 19:28       ` Dmitry Vyukov
2017-03-28 16:15 ` [PATCH 6/8] kasan: allow kasan_check_read/write() to accept pointers to volatiles Dmitry Vyukov
2017-03-28 16:15 ` [PATCH 7/8] asm-generic: add KASAN instrumentation to atomic operations Dmitry Vyukov
2017-03-29 14:00   ` Mark Rutland
2017-03-29 15:52     ` Dmitry Vyukov
2017-03-29 15:56       ` Mark Rutland
2017-03-28 16:15 ` [PATCH 8/8] asm-generic, x86: add comments for atomic instrumentation Dmitry Vyukov
2017-03-28 16:26 ` [PATCH 0/8] x86, kasan: add KASAN checks to atomic operations Dmitry Vyukov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8aacc971a30c72b442e87d3f8fc2ac70f281e31d.1490717337.git.dvyukov@google.com \
    --to=dvyukov@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=aryabinin@virtuozzo.com \
    --cc=hpa@zytor.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=will.deacon@arm.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).