[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230510181717.2200934-5-paulmck@kernel.org>
Date: Wed, 10 May 2023 11:17:03 -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 05/19] locking/atomic: Add kernel-doc header for arch_${atomic}_${pfx}dec${sfx}${order}
Add kernel-doc header template for arch_${atomic}_${pfx}dec${sfx}${order}
function family.
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 | 128 +++++++++++++++++++-
scripts/atomic/fallbacks/dec | 7 ++
2 files changed, 134 insertions(+), 1 deletion(-)
diff --git a/include/linux/atomic/atomic-arch-fallback.h b/include/linux/atomic/atomic-arch-fallback.h
index e7e83f18d192..41e43e8dff8d 100644
--- a/include/linux/atomic/atomic-arch-fallback.h
+++ b/include/linux/atomic/atomic-arch-fallback.h
@@ -674,6 +674,13 @@ arch_atomic_fetch_inc(atomic_t *v)
#endif /* arch_atomic_fetch_inc_relaxed */
#ifndef arch_atomic_dec
+/**
+ * arch_atomic_dec - Atomic decrement
+ * @v: pointer of type atomic_t
+ *
+ * Atomically decrement @v with full ordering,
+ * returning no value.
+ */
static __always_inline void
arch_atomic_dec(atomic_t *v)
{
@@ -690,6 +697,13 @@ arch_atomic_dec(atomic_t *v)
#endif /* arch_atomic_dec_return */
#ifndef arch_atomic_dec_return
+/**
+ * arch_atomic_dec_return - Atomic decrement
+ * @v: pointer of type atomic_t
+ *
+ * Atomically decrement @v with full ordering,
+ * returning new value.
+ */
static __always_inline int
arch_atomic_dec_return(atomic_t *v)
{
@@ -699,6 +713,13 @@ arch_atomic_dec_return(atomic_t *v)
#endif
#ifndef arch_atomic_dec_return_acquire
+/**
+ * arch_atomic_dec_return_acquire - Atomic decrement
+ * @v: pointer of type atomic_t
+ *
+ * Atomically decrement @v with acquire ordering,
+ * returning new value.
+ */
static __always_inline int
arch_atomic_dec_return_acquire(atomic_t *v)
{
@@ -708,6 +729,13 @@ arch_atomic_dec_return_acquire(atomic_t *v)
#endif
#ifndef arch_atomic_dec_return_release
+/**
+ * arch_atomic_dec_return_release - Atomic decrement
+ * @v: pointer of type atomic_t
+ *
+ * Atomically decrement @v with release ordering,
+ * returning new value.
+ */
static __always_inline int
arch_atomic_dec_return_release(atomic_t *v)
{
@@ -717,6 +745,13 @@ arch_atomic_dec_return_release(atomic_t *v)
#endif
#ifndef arch_atomic_dec_return_relaxed
+/**
+ * arch_atomic_dec_return_relaxed - Atomic decrement
+ * @v: pointer of type atomic_t
+ *
+ * Atomically decrement @v with no ordering,
+ * returning new value.
+ */
static __always_inline int
arch_atomic_dec_return_relaxed(atomic_t *v)
{
@@ -771,6 +806,13 @@ arch_atomic_dec_return(atomic_t *v)
#endif /* arch_atomic_fetch_dec */
#ifndef arch_atomic_fetch_dec
+/**
+ * arch_atomic_fetch_dec - Atomic decrement
+ * @v: pointer of type atomic_t
+ *
+ * Atomically decrement @v with full ordering,
+ * returning old value.
+ */
static __always_inline int
arch_atomic_fetch_dec(atomic_t *v)
{
@@ -780,6 +822,13 @@ arch_atomic_fetch_dec(atomic_t *v)
#endif
#ifndef arch_atomic_fetch_dec_acquire
+/**
+ * arch_atomic_fetch_dec_acquire - Atomic decrement
+ * @v: pointer of type atomic_t
+ *
+ * Atomically decrement @v with acquire ordering,
+ * returning old value.
+ */
static __always_inline int
arch_atomic_fetch_dec_acquire(atomic_t *v)
{
@@ -789,6 +838,13 @@ arch_atomic_fetch_dec_acquire(atomic_t *v)
#endif
#ifndef arch_atomic_fetch_dec_release
+/**
+ * arch_atomic_fetch_dec_release - Atomic decrement
+ * @v: pointer of type atomic_t
+ *
+ * Atomically decrement @v with release ordering,
+ * returning old value.
+ */
static __always_inline int
arch_atomic_fetch_dec_release(atomic_t *v)
{
@@ -798,6 +854,13 @@ arch_atomic_fetch_dec_release(atomic_t *v)
#endif
#ifndef arch_atomic_fetch_dec_relaxed
+/**
+ * arch_atomic_fetch_dec_relaxed - Atomic decrement
+ * @v: pointer of type atomic_t
+ *
+ * Atomically decrement @v with no ordering,
+ * returning old value.
+ */
static __always_inline int
arch_atomic_fetch_dec_relaxed(atomic_t *v)
{
@@ -1953,6 +2016,13 @@ arch_atomic64_fetch_inc(atomic64_t *v)
#endif /* arch_atomic64_fetch_inc_relaxed */
#ifndef arch_atomic64_dec
+/**
+ * arch_atomic64_dec - Atomic decrement
+ * @v: pointer of type atomic64_t
+ *
+ * Atomically decrement @v with full ordering,
+ * returning no value.
+ */
static __always_inline void
arch_atomic64_dec(atomic64_t *v)
{
@@ -1969,6 +2039,13 @@ arch_atomic64_dec(atomic64_t *v)
#endif /* arch_atomic64_dec_return */
#ifndef arch_atomic64_dec_return
+/**
+ * arch_atomic64_dec_return - Atomic decrement
+ * @v: pointer of type atomic64_t
+ *
+ * Atomically decrement @v with full ordering,
+ * returning new value.
+ */
static __always_inline s64
arch_atomic64_dec_return(atomic64_t *v)
{
@@ -1978,6 +2055,13 @@ arch_atomic64_dec_return(atomic64_t *v)
#endif
#ifndef arch_atomic64_dec_return_acquire
+/**
+ * arch_atomic64_dec_return_acquire - Atomic decrement
+ * @v: pointer of type atomic64_t
+ *
+ * Atomically decrement @v with acquire ordering,
+ * returning new value.
+ */
static __always_inline s64
arch_atomic64_dec_return_acquire(atomic64_t *v)
{
@@ -1987,6 +2071,13 @@ arch_atomic64_dec_return_acquire(atomic64_t *v)
#endif
#ifndef arch_atomic64_dec_return_release
+/**
+ * arch_atomic64_dec_return_release - Atomic decrement
+ * @v: pointer of type atomic64_t
+ *
+ * Atomically decrement @v with release ordering,
+ * returning new value.
+ */
static __always_inline s64
arch_atomic64_dec_return_release(atomic64_t *v)
{
@@ -1996,6 +2087,13 @@ arch_atomic64_dec_return_release(atomic64_t *v)
#endif
#ifndef arch_atomic64_dec_return_relaxed
+/**
+ * arch_atomic64_dec_return_relaxed - Atomic decrement
+ * @v: pointer of type atomic64_t
+ *
+ * Atomically decrement @v with no ordering,
+ * returning new value.
+ */
static __always_inline s64
arch_atomic64_dec_return_relaxed(atomic64_t *v)
{
@@ -2050,6 +2148,13 @@ arch_atomic64_dec_return(atomic64_t *v)
#endif /* arch_atomic64_fetch_dec */
#ifndef arch_atomic64_fetch_dec
+/**
+ * arch_atomic64_fetch_dec - Atomic decrement
+ * @v: pointer of type atomic64_t
+ *
+ * Atomically decrement @v with full ordering,
+ * returning old value.
+ */
static __always_inline s64
arch_atomic64_fetch_dec(atomic64_t *v)
{
@@ -2059,6 +2164,13 @@ arch_atomic64_fetch_dec(atomic64_t *v)
#endif
#ifndef arch_atomic64_fetch_dec_acquire
+/**
+ * arch_atomic64_fetch_dec_acquire - Atomic decrement
+ * @v: pointer of type atomic64_t
+ *
+ * Atomically decrement @v with acquire ordering,
+ * returning old value.
+ */
static __always_inline s64
arch_atomic64_fetch_dec_acquire(atomic64_t *v)
{
@@ -2068,6 +2180,13 @@ arch_atomic64_fetch_dec_acquire(atomic64_t *v)
#endif
#ifndef arch_atomic64_fetch_dec_release
+/**
+ * arch_atomic64_fetch_dec_release - Atomic decrement
+ * @v: pointer of type atomic64_t
+ *
+ * Atomically decrement @v with release ordering,
+ * returning old value.
+ */
static __always_inline s64
arch_atomic64_fetch_dec_release(atomic64_t *v)
{
@@ -2077,6 +2196,13 @@ arch_atomic64_fetch_dec_release(atomic64_t *v)
#endif
#ifndef arch_atomic64_fetch_dec_relaxed
+/**
+ * arch_atomic64_fetch_dec_relaxed - Atomic decrement
+ * @v: pointer of type atomic64_t
+ *
+ * Atomically decrement @v with no ordering,
+ * returning old value.
+ */
static __always_inline s64
arch_atomic64_fetch_dec_relaxed(atomic64_t *v)
{
@@ -2794,4 +2920,4 @@ arch_atomic64_dec_if_positive(atomic64_t *v)
#endif
#endif /* _LINUX_ATOMIC_FALLBACK_H */
-// 17cefb0ff9b450685d4072202d4a1c309b0606c2
+// 1a1d30491494653253bfe3b5d2e2c6583cb57473
diff --git a/scripts/atomic/fallbacks/dec b/scripts/atomic/fallbacks/dec
index 8c144c818e9e..e99c8edd36a3 100755
--- a/scripts/atomic/fallbacks/dec
+++ b/scripts/atomic/fallbacks/dec
@@ -1,4 +1,11 @@
cat <<EOF
+/**
+ * arch_${atomic}_${pfx}dec${sfx}${order} - Atomic decrement
+ * @v: pointer of type ${atomic}_t
+ *
+ * Atomically decrement @v with ${docbook_order} ordering,
+ * returning ${docbook_oldnew} value.
+ */
static __always_inline ${ret}
arch_${atomic}_${pfx}dec${sfx}${order}(${atomic}_t *v)
{
--
2.40.1
Powered by blists - more mailing lists