From: Ankur Arora <ankur.a.arora@oracle.com>
To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, bpf@vger.kernel.org
Cc: arnd@arndb.de, catalin.marinas@arm.com, will@kernel.org,
peterz@infradead.org, akpm@linux-foundation.org,
mark.rutland@arm.com, harisokn@amazon.com, cl@gentwo.org,
ast@kernel.org, memxor@gmail.com, zhenglifeng1@huawei.com,
xueshuai@linux.alibaba.com, joao.m.martins@oracle.com,
boris.ostrovsky@oracle.com, konrad.wilk@oracle.com
Subject: [PATCH v3 4/5] arm64: barrier: Support waiting in smp_cond_load_relaxed_timewait()
Date: Thu, 26 Jun 2025 21:48:04 -0700 [thread overview]
Message-ID: <20250627044805.945491-5-ankur.a.arora@oracle.com> (raw)
In-Reply-To: <20250627044805.945491-1-ankur.a.arora@oracle.com>
Define __smp_timewait_store() to support waiting for a condition
variable via __cmpwait_relaxed().
Used from smp_cond_load_{relaxed,acquire}_timewait().
Cc: Will Deacon <will@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Christoph Lameter (Ampere) <cl@gentwo.org>
Reviewed-by: Haris Okanovic <harisokn@amazon.com>
Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com>
---
arch/arm64/include/asm/barrier.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm64/include/asm/barrier.h b/arch/arm64/include/asm/barrier.h
index 1ca947d5c939..7c56e2621c7d 100644
--- a/arch/arm64/include/asm/barrier.h
+++ b/arch/arm64/include/asm/barrier.h
@@ -216,6 +216,12 @@ do { \
(typeof(*ptr))VAL; \
})
+/*
+ * Support waiting in smp_cond_load_{relaxed,acquire}_timewait().
+ */
+#define __smp_timewait_store(ptr, val) \
+ __cmpwait_relaxed(ptr, val)
+
#include <asm-generic/barrier.h>
#endif /* __ASSEMBLY__ */
--
2.43.5
next prev parent reply other threads:[~2025-06-27 5:03 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-27 4:48 [PATCH v3 0/5] barrier: Add smp_cond_load_*_timewait() Ankur Arora
2025-06-27 4:48 ` [PATCH v3 1/5] asm-generic: barrier: Add smp_cond_load_relaxed_timewait() Ankur Arora
2025-08-08 10:51 ` Catalin Marinas
2025-08-11 21:15 ` Ankur Arora
2025-08-13 16:09 ` Catalin Marinas
2025-08-13 16:29 ` Arnd Bergmann
2025-08-13 16:54 ` Christoph Lameter (Ampere)
2025-08-14 13:00 ` Catalin Marinas
2025-08-18 11:51 ` Arnd Bergmann
2025-08-18 18:28 ` Catalin Marinas
2025-08-14 7:30 ` Ankur Arora
2025-08-14 11:39 ` Catalin Marinas
2025-08-17 22:14 ` Ankur Arora
2025-08-18 17:55 ` Catalin Marinas
2025-08-18 19:15 ` Ankur Arora
2025-08-19 10:34 ` Catalin Marinas
2025-06-27 4:48 ` [PATCH v3 2/5] asm-generic: barrier: Handle spin-wait in smp_cond_load_relaxed_timewait() Ankur Arora
2025-06-27 4:48 ` [PATCH v3 3/5] asm-generic: barrier: Add smp_cond_load_acquire_timewait() Ankur Arora
2025-08-08 9:38 ` Catalin Marinas
2025-08-12 5:18 ` Ankur Arora
2025-06-27 4:48 ` Ankur Arora [this message]
2025-06-27 4:48 ` [PATCH v3 5/5] arm64: barrier: Handle waiting in smp_cond_load_relaxed_timewait() Ankur Arora
2025-06-30 16:33 ` Christoph Lameter (Ampere)
2025-06-30 21:05 ` Ankur Arora
2025-07-01 5:55 ` Ankur Arora
2025-07-28 19:03 ` [PATCH v3 0/5] barrier: Add smp_cond_load_*_timewait() Ankur Arora
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=20250627044805.945491-5-ankur.a.arora@oracle.com \
--to=ankur.a.arora@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=ast@kernel.org \
--cc=boris.ostrovsky@oracle.com \
--cc=bpf@vger.kernel.org \
--cc=catalin.marinas@arm.com \
--cc=cl@gentwo.org \
--cc=harisokn@amazon.com \
--cc=joao.m.martins@oracle.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=memxor@gmail.com \
--cc=peterz@infradead.org \
--cc=will@kernel.org \
--cc=xueshuai@linux.alibaba.com \
--cc=zhenglifeng1@huawei.com \
/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).