From: Joonwon Kang <joonwonkang@google.com>
To: jassisinghbrar@gmail.com, sudeep.holla@kernel.org
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
akpm@linux-foundation.org, Joonwon Kang <joonwonkang@google.com>
Subject: [PATCH] mailbox: Clarify multi-thread is not supported in blocking mode
Date: Tue, 21 Apr 2026 10:46:51 +0000 [thread overview]
Message-ID: <20260421104652.211276-1-joonwonkang@google.com> (raw)
Unlike in non-blocking mode, multi-thread has not been supported in
blocking mode. This commit is to prevent clients from having wrong
assumption by explicitly specifying this fact to the API doc.
Cc: stable@vger.kernel.org
Signed-off-by: Joonwon Kang <joonwonkang@google.com>
---
v1: Abandon the previous attempts to support multi-thread in blocking
mode and instead declare it is not supported.
drivers/mailbox/mailbox.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c
index bbc9fd75a95f..b00f7a32e866 100644
--- a/drivers/mailbox/mailbox.c
+++ b/drivers/mailbox/mailbox.c
@@ -258,6 +258,10 @@ EXPORT_SYMBOL_GPL(mbox_chan_tx_slots_available);
* over the chan, i.e, tx_done() is made.
* This function could be called from atomic context as it simply
* queues the data and returns a token against the request.
+ * In blocking mode, it is caller's responsibility to serialize threads'
+ * access to a channel if multi-threads are to send messages through the
+ * same channel, i.e. caller should not call this function until any
+ * previous call returns.
*
* Return: Non-negative integer for successful submission (non-blocking mode)
* or transmission over chan (blocking mode).
--
2.54.0.rc1.555.g9c883467ad-goog
next reply other threads:[~2026-04-21 10:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-21 10:46 Joonwon Kang [this message]
2026-04-21 10:46 ` [PATCH v4] mailbox: Make mbox_send_message() return error code when tx fails Joonwon Kang
2026-05-07 4:56 ` Joonwon Kang
2026-05-07 13:25 ` Sudeep Holla
2026-05-07 14:47 ` Joonwon Kang
2026-05-08 8:35 ` Sudeep Holla
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=20260421104652.211276-1-joonwonkang@google.com \
--to=joonwonkang@google.com \
--cc=akpm@linux-foundation.org \
--cc=jassisinghbrar@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=sudeep.holla@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.