[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230510181717.2200934-6-paulmck@kernel.org>
Date: Wed, 10 May 2023 11:17:04 -0700
From: "Paul E. McKenney" <paulmck@...nel.org>
To: linux-kernel@...r.kernel.org
Cc: x86@...nel.org, akiyks@...il.com, linux-doc@...r.kernel.org,
kernel-team@...a.com, "Paul E. McKenney" <paulmck@...nel.org>,
Will Deacon <will@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Boqun Feng <boqun.feng@...il.com>,
Mark Rutland <mark.rutland@....com>
Subject: [PATCH locking/atomic 06/19] locking/atomic: Add kernel-doc header for arch_${atomic}_${pfx}andnot${sfx}${order}
Add kernel-doc header template for arch_${atomic}_${pfx}andnot${sfx}${order}
function family.
[ paulmck: Apply feedback from Akira Yokosawa. ]
Signed-off-by: Paul E. McKenney <paulmck@...nel.org>
Cc: Will Deacon <will@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Boqun Feng <boqun.feng@...il.com>
Cc: Mark Rutland <mark.rutland@....com>
---
include/linux/atomic/atomic-arch-fallback.h | 82 ++++++++++++++++++++-
scripts/atomic/fallbacks/andnot | 8 ++
2 files changed, 89 insertions(+), 1 deletion(-)
diff --git a/include/linux/atomic/atomic-arch-fallback.h b/include/linux/atomic/atomic-arch-fallback.h
index 41e43e8dff8d..d5ff29a7128d 100644
--- a/include/linux/atomic/atomic-arch-fallback.h
+++ b/include/linux/atomic/atomic-arch-fallback.h
@@ -950,6 +950,14 @@ arch_atomic_fetch_and(int i, atomic_t *v)
#endif /* arch_atomic_fetch_and_relaxed */
#ifndef arch_atomic_andnot
+/**
+ * arch_atomic_andnot - Atomic and-not
+ * @i: the quantity to and-not with *@v
+ * @v: pointer of type atomic_t
+ *
+ * Atomically and-not @i with @v using full ordering.
+ * returning no value.
+ */
static __always_inline void
arch_atomic_andnot(int i, atomic_t *v)
{
@@ -966,6 +974,14 @@ arch_atomic_andnot(int i, atomic_t *v)
#endif /* arch_atomic_fetch_andnot */
#ifndef arch_atomic_fetch_andnot
+/**
+ * arch_atomic_fetch_andnot - Atomic and-not
+ * @i: the quantity to and-not with *@v
+ * @v: pointer of type atomic_t
+ *
+ * Atomically and-not @i with @v using full ordering.
+ * returning old value.
+ */
static __always_inline int
arch_atomic_fetch_andnot(int i, atomic_t *v)
{
@@ -975,6 +991,14 @@ arch_atomic_fetch_andnot(int i, atomic_t *v)
#endif
#ifndef arch_atomic_fetch_andnot_acquire
+/**
+ * arch_atomic_fetch_andnot_acquire - Atomic and-not
+ * @i: the quantity to and-not with *@v
+ * @v: pointer of type atomic_t
+ *
+ * Atomically and-not @i with @v using acquire ordering.
+ * returning old value.
+ */
static __always_inline int
arch_atomic_fetch_andnot_acquire(int i, atomic_t *v)
{
@@ -984,6 +1008,14 @@ arch_atomic_fetch_andnot_acquire(int i, atomic_t *v)
#endif
#ifndef arch_atomic_fetch_andnot_release
+/**
+ * arch_atomic_fetch_andnot_release - Atomic and-not
+ * @i: the quantity to and-not with *@v
+ * @v: pointer of type atomic_t
+ *
+ * Atomically and-not @i with @v using release ordering.
+ * returning old value.
+ */
static __always_inline int
arch_atomic_fetch_andnot_release(int i, atomic_t *v)
{
@@ -993,6 +1025,14 @@ arch_atomic_fetch_andnot_release(int i, atomic_t *v)
#endif
#ifndef arch_atomic_fetch_andnot_relaxed
+/**
+ * arch_atomic_fetch_andnot_relaxed - Atomic and-not
+ * @i: the quantity to and-not with *@v
+ * @v: pointer of type atomic_t
+ *
+ * Atomically and-not @i with @v using no ordering.
+ * returning old value.
+ */
static __always_inline int
arch_atomic_fetch_andnot_relaxed(int i, atomic_t *v)
{
@@ -2292,6 +2332,14 @@ arch_atomic64_fetch_and(s64 i, atomic64_t *v)
#endif /* arch_atomic64_fetch_and_relaxed */
#ifndef arch_atomic64_andnot
+/**
+ * arch_atomic64_andnot - Atomic and-not
+ * @i: the quantity to and-not with *@v
+ * @v: pointer of type atomic64_t
+ *
+ * Atomically and-not @i with @v using full ordering.
+ * returning no value.
+ */
static __always_inline void
arch_atomic64_andnot(s64 i, atomic64_t *v)
{
@@ -2308,6 +2356,14 @@ arch_atomic64_andnot(s64 i, atomic64_t *v)
#endif /* arch_atomic64_fetch_andnot */
#ifndef arch_atomic64_fetch_andnot
+/**
+ * arch_atomic64_fetch_andnot - Atomic and-not
+ * @i: the quantity to and-not with *@v
+ * @v: pointer of type atomic64_t
+ *
+ * Atomically and-not @i with @v using full ordering.
+ * returning old value.
+ */
static __always_inline s64
arch_atomic64_fetch_andnot(s64 i, atomic64_t *v)
{
@@ -2317,6 +2373,14 @@ arch_atomic64_fetch_andnot(s64 i, atomic64_t *v)
#endif
#ifndef arch_atomic64_fetch_andnot_acquire
+/**
+ * arch_atomic64_fetch_andnot_acquire - Atomic and-not
+ * @i: the quantity to and-not with *@v
+ * @v: pointer of type atomic64_t
+ *
+ * Atomically and-not @i with @v using acquire ordering.
+ * returning old value.
+ */
static __always_inline s64
arch_atomic64_fetch_andnot_acquire(s64 i, atomic64_t *v)
{
@@ -2326,6 +2390,14 @@ arch_atomic64_fetch_andnot_acquire(s64 i, atomic64_t *v)
#endif
#ifndef arch_atomic64_fetch_andnot_release
+/**
+ * arch_atomic64_fetch_andnot_release - Atomic and-not
+ * @i: the quantity to and-not with *@v
+ * @v: pointer of type atomic64_t
+ *
+ * Atomically and-not @i with @v using release ordering.
+ * returning old value.
+ */
static __always_inline s64
arch_atomic64_fetch_andnot_release(s64 i, atomic64_t *v)
{
@@ -2335,6 +2407,14 @@ arch_atomic64_fetch_andnot_release(s64 i, atomic64_t *v)
#endif
#ifndef arch_atomic64_fetch_andnot_relaxed
+/**
+ * arch_atomic64_fetch_andnot_relaxed - Atomic and-not
+ * @i: the quantity to and-not with *@v
+ * @v: pointer of type atomic64_t
+ *
+ * Atomically and-not @i with @v using no ordering.
+ * returning old value.
+ */
static __always_inline s64
arch_atomic64_fetch_andnot_relaxed(s64 i, atomic64_t *v)
{
@@ -2920,4 +3000,4 @@ arch_atomic64_dec_if_positive(atomic64_t *v)
#endif
#endif /* _LINUX_ATOMIC_FALLBACK_H */
-// 1a1d30491494653253bfe3b5d2e2c6583cb57473
+// e403f06ce98fe72ae0698e8f2c78f8a45894e465
diff --git a/scripts/atomic/fallbacks/andnot b/scripts/atomic/fallbacks/andnot
index 5a42f54a3595..9fbc0ce75a7c 100755
--- a/scripts/atomic/fallbacks/andnot
+++ b/scripts/atomic/fallbacks/andnot
@@ -1,4 +1,12 @@
cat <<EOF
+/**
+ * arch_${atomic}_${pfx}andnot${sfx}${order} - Atomic and-not
+ * @i: the quantity to and-not with *@v
+ * @v: pointer of type ${atomic}_t
+ *
+ * Atomically and-not @i with @v using ${docbook_order} ordering.
+ * returning ${docbook_oldnew} value.
+ */
static __always_inline ${ret}
arch_${atomic}_${pfx}andnot${sfx}${order}(${int} i, ${atomic}_t *v)
{
--
2.40.1
Powered by blists - more mailing lists