* [PATCH v3 01/15] mailbox: Deprecate NULL mbox messages; Introduce mbox_ring_doorbell()
2026-02-16 18:09 [PATCH v3 00/15] mailbox: Stop sending NULL mailbox messages Douglas Anderson
@ 2026-02-16 18:09 ` Douglas Anderson
2026-03-10 3:23 ` Jassi Brar
2026-02-16 18:09 ` [PATCH v3 04/15] firmware: imx-dsp: Use mbox_ring_doorbell() instead of NULL message Douglas Anderson
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Douglas Anderson @ 2026-02-16 18:09 UTC (permalink / raw)
To: jassisinghbrar
Cc: Douglas Anderson, Bjorn Andersson, Frank.Li, arm-scmi,
cristian.marussi, festevam, imx, jay.buddhabhatti, jonathanh,
kernel, konradybcio, krzk, lenb, linux-acpi, linux-arm-kernel,
linux-arm-msm, linux-kernel, linux-remoteproc, linux-tegra,
lucaswei, mathieu.poirier, michal.simek, nm, rafael, robh,
s.hauer, shawn.guo, ssantosh, sudeep.holla, tglx, thierry.reding
The way the mailbox core behaves when you pass a NULL `mssg` parameter
to mbox_send_message() is a little questionable. Specifically, the
mailbox core stores the currently active message directly in its
`active_req` field. In at least two places it decides that if this
field is `NULL` then there is no active request. That means if `mssg`
is ever NULL it will cause the mailbox core to think is no active
request. The two places where it does this are:
1. When a client calls mbox_send_message(), if `active_req` is NULL
then it will call the mailbox controller to send the new message
even if the mailbox controller hasn't yet called mbox_chan_txdone()
on the previous (NULL) message.
2. The mailbox core will never call the client's `tx_done()` callback
with a NULL message because `tx_tick()` returns early whenever the
message is NULL.
Though the above doesn't look like it was a conscious design choice,
it does have the benefit of providing a simple way to assert an
edge-triggered interrupt to the remote processor on the other side of
the mailbox. Specifically:
1. Like a normal edge-triggered interrupt, if multiple edges arrive
before the interrupt is Acked they are coalesced.
2. Like a normal edge-triggered interrupt, as long as the receiver
(the remote processor in this case) "Ack"s the interrupt _before_
checking for work and the sender (the mailbox client in this case)
posts the interrupt _after_ adding new work then we can always be
certain that new work will be noticed. This assumes that the
mailbox client and remote processor have some out-of-band way to
communicate work and the mailbox is just being used as an
interrupt.
Doing a `git grep -A1 mbox_send_message | grep NULL` shows 14 hits in
mainline today, but it's not 100% clear if all of those users are
relying on the benefits/quirks of the existing behavior.
Since the current NULL `mssg` behavior is a bit questionable but has
some benefits, let's:
1. Deprecate the NULL behavior and print a warning.
2. Add a new mbox_ring_doorbell() function that is very similar to the
existing NULL `mssg` case but a tad bit cleaner.
The design of the new mbox_ring_doorbell() will be to maximize
compatibility with the old NULL `mssg` behavior. Specifically:
* We'll still pass NULL to the mailbox controller to indicate a
doorbell.
* Doorbells will not be queued and won't have txdone.
* We'll call immediately into the mailbox controller when a doorbell
is posted.
With the above, any mailbox clients that don't mix doorbells and
normal messages are intended to see no change in behavior when
switching to the new API. Using the new API, which officiall documents
that mbox_client_txdone() shouldn't be called for doorbells, does
allow us to remove those calls.
There are two differences in behavior between the old sending a NULL
message and the new mbox_ring_doorbell():
1. If the mailbox controller returned an error when trying to send a
NULL message, the old NULL message could have ended up being queued
up in the core's FIFO. Now we will just return the error.
2. If a client rings a doorbell while a non-doorbell message is in
progress, previously NULL messages would have been "queued" in that
case and now doorbells will be immediately posted.
I'm hoping that nobody was relying on either of the two differences.
In general holding NULL messages in the mailbox core's queue has odd
behavior and is hard to reason about. Hopefully it's reasonable to
assume nobody was doing this.
As mentioned above, it should be noted that it's now documented that
"txdone" shouldn't be called (by both mailbox drivers and clients) for
doorbells. That being said, in most cases it won't hurt since the
mailbox core will ignore the bogus "txdone". The only case where it's
critical for a mailbox controller not to call "txdone" for a doorbell
is when a mailbox channel mixes normal messages and doorbells and
cares about the txdone callback. Specifically, when you ring a
doorbell and immediately send a normal message, if the controller
calls "txdone" for the doorbell it could look as if the normal message
finished before it should have. This issue also would have happened
with the old NULL `mssg`, though.
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
Changes in v3:
- Suggest mbox_ring_doorbell in the warning message
Changes in v2:
- Instead of just documenting NULL, introduce a new function
drivers/mailbox/mailbox.c | 82 +++++++++++++++++++++++++++++-
include/linux/mailbox_client.h | 1 +
include/linux/mailbox_controller.h | 4 +-
3 files changed, 85 insertions(+), 2 deletions(-)
diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c
index 617ba505691d..fe3f2f75e734 100644
--- a/drivers/mailbox/mailbox.c
+++ b/drivers/mailbox/mailbox.c
@@ -161,6 +161,9 @@ EXPORT_SYMBOL_GPL(mbox_chan_received_data);
* The controller that has IRQ for TX ACK calls this atomic API
* to tick the TX state machine. It works only if txdone_irq
* is set by the controller.
+ *
+ * Should not be called for "doorbell" messages (any time the message
+ * sent was NULL).
*/
void mbox_chan_txdone(struct mbox_chan *chan, int r)
{
@@ -182,6 +185,9 @@ EXPORT_SYMBOL_GPL(mbox_chan_txdone);
* The client/protocol had received some 'ACK' packet and it notifies
* the API that the last packet was sent successfully. This only works
* if the controller can't sense TX-Done.
+ *
+ * Should not be called for "doorbell" messages (any time the message
+ * sent was NULL).
*/
void mbox_client_txdone(struct mbox_chan *chan, int r)
{
@@ -222,7 +228,7 @@ EXPORT_SYMBOL_GPL(mbox_client_peek_data);
* mbox_send_message - For client to submit a message to be
* sent to the remote.
* @chan: Mailbox channel assigned to this client.
- * @mssg: Client specific message typecasted.
+ * @mssg: Client specific message typecasted. Should not be NULL.
*
* For client to submit data to the controller destined for a remote
* processor. If the client had set 'tx_block', the call will return
@@ -249,6 +255,28 @@ int mbox_send_message(struct mbox_chan *chan, void *mssg)
if (!chan || !chan->cl)
return -EINVAL;
+ /*
+ * The mailbox core gets confused when mbox_send_message() is called
+ * with NULL messages since the code directly stores messages in
+ * `active_req` and assumes that a NULL `active_req` means no request
+ * is active. This causes the core to call the mailbox controller a
+ * second time even if the previous message hasn't finished and also
+ * means the client's tx_done() callback will never be called. However,
+ * clients historically passed NULL anyway. Deprecate passing NULL
+ * here by adding a warning.
+ *
+ * Clients who don't have a message should switch to using
+ * mbox_ring_doorbell(), which explicitly documents the immediate
+ * sending of doorbells, the lack of txdone, and what happens if you
+ * mix doorbells and normal messages.
+ *
+ * TODO: when it's certain that all clients have transitioned, consider
+ * changing this to return -EINVAL.
+ */
+ if (!mssg)
+ dev_warn_once(chan->mbox->dev,
+ "NULL mbox messages are deprecated; use mbox_ring_doorbell\n");
+
t = add_to_rbuf(chan, mssg);
if (t < 0) {
dev_err(chan->mbox->dev, "Try increasing MBOX_TX_QUEUE_LEN\n");
@@ -277,6 +305,58 @@ int mbox_send_message(struct mbox_chan *chan, void *mssg)
}
EXPORT_SYMBOL_GPL(mbox_send_message);
+/**
+ * mbox_ring_doorbell - Client function to ring the doorbell with no message.
+ * @chan: Mailbox channel assigned to this client.
+ *
+ * Send a notification to the remote side of the mailbox but don't actually
+ * send any data. This is typically used when the client and the remote side
+ * of the mailbox have some other (non-mailbox) way to communicate and the
+ * mailbox is simply used as an "interrupt" to notify the remote side.
+ *
+ * This function has a few important differences from mbox_send_message():
+ * - There is no concept of "txdone" for mbox_ring_doorbell(), even if the
+ * controller itself would be able to tell when the remote CPU saw or Acked
+ * the doorbell.
+ * - Because there is no concept of "txdone", there is no need to wait for
+ * previous doorbells to "finish" before notifying the controller of another
+ * doorbell.
+ * - Because we never wait to notify a controller of a doorbell, there is no
+ * queue for doorbells.
+ *
+ * The above properties mean that calling mbox_ring_doorbell() is the equivalent
+ * of re-asserting an edge triggered interrupt to the remote side. If the remote
+ * side hasn't yet "cleared" the interrupt this is a no-op. If the remote side
+ * has cleared the interrupt, it will be re-asserted. Expected usage:
+ *
+ * This CPU:
+ * - Update out-of-band (OOB) memory shared between this CPU and remote CPU.
+ * - Ring doorbell.
+ * Remote CPU:
+ * - Clear doorbell.
+ * - Read OOB shared memory and act on it.
+ *
+ * The remote CPU will always be guaranteed to notice changes, even if this CPU
+ * updates / rings multiple times before the remote CPU has a chance to run.
+ *
+ * Mixing calls of mbox_ring_doorbell() and mbox_send_message() on the same
+ * mailbox channel is allowed, assuming the mailbox controller correctly avoids
+ * calling mbox_chan_txdone() for doorbells.
+ *
+ * NOTE: For compatibility reasons, doorbells are sent to the mailbox
+ * controller driver by passing NULL to the mailbox controller's
+ * send_data() callback.
+ *
+ * Return: Negative error code upon failure.
+ */
+int mbox_ring_doorbell(struct mbox_chan *chan)
+{
+ guard(spinlock_irqsave)(&chan->lock);
+
+ return chan->mbox->ops->send_data(chan, NULL);
+}
+EXPORT_SYMBOL_GPL(mbox_ring_doorbell);
+
/**
* mbox_flush - flush a mailbox channel
* @chan: mailbox channel to flush
diff --git a/include/linux/mailbox_client.h b/include/linux/mailbox_client.h
index c6eea9afb943..e3fc11e42c58 100644
--- a/include/linux/mailbox_client.h
+++ b/include/linux/mailbox_client.h
@@ -42,6 +42,7 @@ struct mbox_chan *mbox_request_channel_byname(struct mbox_client *cl,
const char *name);
struct mbox_chan *mbox_request_channel(struct mbox_client *cl, int index);
int mbox_send_message(struct mbox_chan *chan, void *mssg);
+int mbox_ring_doorbell(struct mbox_chan *chan);
int mbox_flush(struct mbox_chan *chan, unsigned long timeout);
void mbox_client_txdone(struct mbox_chan *chan, int r); /* atomic */
bool mbox_client_peek_data(struct mbox_chan *chan); /* atomic */
diff --git a/include/linux/mailbox_controller.h b/include/linux/mailbox_controller.h
index 80a427c7ca29..36648fa7b6f3 100644
--- a/include/linux/mailbox_controller.h
+++ b/include/linux/mailbox_controller.h
@@ -19,7 +19,9 @@ struct mbox_chan;
* if the remote hasn't yet read the last data sent. Actual
* transmission of data is reported by the controller via
* mbox_chan_txdone (if it has some TX ACK irq). It must not
- * sleep.
+ * sleep. Will be passed NULL data for doorbell-only messages.
+ * Note that doorbell messages are always sent immediately with
+ * no queuing. mbox_chan_txdone() shouldn't be called on doorbells.
* @flush: Called when a client requests transmissions to be blocking but
* the context doesn't allow sleeping. Typically the controller
* will implement a busy loop waiting for the data to flush out.
--
2.53.0.273.g2a3d683680-goog
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH v3 01/15] mailbox: Deprecate NULL mbox messages; Introduce mbox_ring_doorbell()
2026-02-16 18:09 ` [PATCH v3 01/15] mailbox: Deprecate NULL mbox messages; Introduce mbox_ring_doorbell() Douglas Anderson
@ 2026-03-10 3:23 ` Jassi Brar
2026-03-10 15:08 ` Doug Anderson
0 siblings, 1 reply; 7+ messages in thread
From: Jassi Brar @ 2026-03-10 3:23 UTC (permalink / raw)
To: Douglas Anderson
Cc: Bjorn Andersson, Frank.Li, arm-scmi, cristian.marussi, festevam,
imx, jay.buddhabhatti, jonathanh, kernel, konradybcio, krzk, lenb,
linux-acpi, linux-arm-kernel, linux-arm-msm, linux-kernel,
linux-remoteproc, linux-tegra, lucaswei, mathieu.poirier,
michal.simek, nm, rafael, robh, s.hauer, shawn.guo, ssantosh,
sudeep.holla, tglx, thierry.reding
Hi Doug,
On Mon, Feb 16, 2026 at 12:11 PM Douglas Anderson <dianders@chromium.org> wrote:
> @@ -249,6 +255,28 @@ int mbox_send_message(struct mbox_chan *chan, void *mssg)
> if (!chan || !chan->cl)
> return -EINVAL;
>
> + /*
> + * The mailbox core gets confused when mbox_send_message() is called
> + * with NULL messages since the code directly stores messages in
> + * `active_req` and assumes that a NULL `active_req` means no request
> + * is active. This causes the core to call the mailbox controller a
> + * second time even if the previous message hasn't finished and also
> + * means the client's tx_done() callback will never be called. However,
> + * clients historically passed NULL anyway. Deprecate passing NULL
> + * here by adding a warning.
> + *
> + * Clients who don't have a message should switch to using
> + * mbox_ring_doorbell(), which explicitly documents the immediate
> + * sending of doorbells, the lack of txdone, and what happens if you
> + * mix doorbells and normal messages.
> + *
> + * TODO: when it's certain that all clients have transitioned, consider
> + * changing this to return -EINVAL.
> + */
> + if (!mssg)
> + dev_warn_once(chan->mbox->dev,
> + "NULL mbox messages are deprecated; use mbox_ring_doorbell\n");
> +
Does this patchset leave some such clients out? If not, should we
drop this block and return -EINVAL already?
Thanks,
Jassi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 01/15] mailbox: Deprecate NULL mbox messages; Introduce mbox_ring_doorbell()
2026-03-10 3:23 ` Jassi Brar
@ 2026-03-10 15:08 ` Doug Anderson
0 siblings, 0 replies; 7+ messages in thread
From: Doug Anderson @ 2026-03-10 15:08 UTC (permalink / raw)
To: Jassi Brar
Cc: Bjorn Andersson, Frank.Li, arm-scmi, cristian.marussi, festevam,
imx, jay.buddhabhatti, jonathanh, kernel, konradybcio, krzk, lenb,
linux-acpi, linux-arm-kernel, linux-arm-msm, linux-kernel,
linux-remoteproc, linux-tegra, lucaswei, mathieu.poirier,
michal.simek, nm, rafael, robh, s.hauer, shawn.guo, ssantosh,
sudeep.holla, tglx, thierry.reding
Hi,
On Mon, Mar 9, 2026 at 8:24 PM Jassi Brar <jassisinghbrar@gmail.com> wrote:
>
> Hi Doug,
>
> On Mon, Feb 16, 2026 at 12:11 PM Douglas Anderson <dianders@chromium.org> wrote:
> > @@ -249,6 +255,28 @@ int mbox_send_message(struct mbox_chan *chan, void *mssg)
> > if (!chan || !chan->cl)
> > return -EINVAL;
> >
> > + /*
> > + * The mailbox core gets confused when mbox_send_message() is called
> > + * with NULL messages since the code directly stores messages in
> > + * `active_req` and assumes that a NULL `active_req` means no request
> > + * is active. This causes the core to call the mailbox controller a
> > + * second time even if the previous message hasn't finished and also
> > + * means the client's tx_done() callback will never be called. However,
> > + * clients historically passed NULL anyway. Deprecate passing NULL
> > + * here by adding a warning.
> > + *
> > + * Clients who don't have a message should switch to using
> > + * mbox_ring_doorbell(), which explicitly documents the immediate
> > + * sending of doorbells, the lack of txdone, and what happens if you
> > + * mix doorbells and normal messages.
> > + *
> > + * TODO: when it's certain that all clients have transitioned, consider
> > + * changing this to return -EINVAL.
> > + */
> > + if (!mssg)
> > + dev_warn_once(chan->mbox->dev,
> > + "NULL mbox messages are deprecated; use mbox_ring_doorbell\n");
> > +
> Does this patchset leave some such clients out? If not, should we
> drop this block and return -EINVAL already?
This patchset series got all the clients that were in mainline at the
time I last checked. However, it was unclear to me if all the patches
would all go through your tree or not, since they don't touch mailbox
drivers but the somewhat widespread places that were clients of
mailbox.
If all the patches aren't going through your tree, we'll need to keep
it like this until we can confirm all of the clients have been
updated. If all the patcheds are going through your tree, then we
could make it return -EINVAL right away, but it we'd have to do that
as a last patch in the series. I think it would still make sense for
the first patch (which adds the mbox_ring_doorbell() call) to have a
warning like this and then a final patch to switch to -EINVAL. That
keeps things bisectable.
What do you think?
I'm happy to post a patch atop my series that switches it to -EINVAL
and you can land it whenever you see fit. Would that work?
-Doug
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 04/15] firmware: imx-dsp: Use mbox_ring_doorbell() instead of NULL message
2026-02-16 18:09 [PATCH v3 00/15] mailbox: Stop sending NULL mailbox messages Douglas Anderson
2026-02-16 18:09 ` [PATCH v3 01/15] mailbox: Deprecate NULL mbox messages; Introduce mbox_ring_doorbell() Douglas Anderson
@ 2026-02-16 18:09 ` Douglas Anderson
2026-03-09 15:19 ` [PATCH v3 00/15] mailbox: Stop sending NULL mailbox messages Doug Anderson
2026-03-11 0:16 ` Doug Anderson
3 siblings, 0 replies; 7+ messages in thread
From: Douglas Anderson @ 2026-02-16 18:09 UTC (permalink / raw)
To: jassisinghbrar
Cc: Douglas Anderson, Daniel Baluta, Frank.Li, Sascha Hauer, festevam,
imx, kernel, linux-arm-kernel, linux-kernel
As per the patch ("mailbox: Deprecate NULL mbox messages; Introduce
mbox_ring_doorbell()"), we want to switch all users of NULL mailbox
messages to use mbox_ring_doorbell().
This client only ever sent NULL messages, so the transition is
straightforward.
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
(no changes since v1)
drivers/firmware/imx/imx-dsp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/imx/imx-dsp.c b/drivers/firmware/imx/imx-dsp.c
index ed79e823157a..231e9f841226 100644
--- a/drivers/firmware/imx/imx-dsp.c
+++ b/drivers/firmware/imx/imx-dsp.c
@@ -30,7 +30,7 @@ int imx_dsp_ring_doorbell(struct imx_dsp_ipc *ipc, unsigned int idx)
return -EINVAL;
dsp_chan = &ipc->chans[idx];
- ret = mbox_send_message(dsp_chan->ch, NULL);
+ ret = mbox_ring_doorbell(dsp_chan->ch);
if (ret < 0)
return ret;
--
2.53.0.273.g2a3d683680-goog
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH v3 00/15] mailbox: Stop sending NULL mailbox messages
2026-02-16 18:09 [PATCH v3 00/15] mailbox: Stop sending NULL mailbox messages Douglas Anderson
2026-02-16 18:09 ` [PATCH v3 01/15] mailbox: Deprecate NULL mbox messages; Introduce mbox_ring_doorbell() Douglas Anderson
2026-02-16 18:09 ` [PATCH v3 04/15] firmware: imx-dsp: Use mbox_ring_doorbell() instead of NULL message Douglas Anderson
@ 2026-03-09 15:19 ` Doug Anderson
2026-03-11 0:16 ` Doug Anderson
3 siblings, 0 replies; 7+ messages in thread
From: Doug Anderson @ 2026-03-09 15:19 UTC (permalink / raw)
To: jassisinghbrar
Cc: Frank.Li, Santosh Shilimkar, Sascha Hauer, andersson, arm-scmi,
cristian.marussi, daniel.baluta, festevam, imx, jay.buddhabhatti,
jonathanh, kernel, konradybcio, krzk, lenb, linux-acpi,
linux-arm-kernel, linux-arm-msm, linux-kernel, linux-remoteproc,
linux-tegra, lucaswei, marco.crivellari, mathieu.poirier,
michal.simek, nm, rafael, robh, shawn.guo, sudeep.holla, tglx,
thierry.reding
Hi Jassi,
On Mon, Feb 16, 2026 at 10:11 AM Douglas Anderson <dianders@chromium.org> wrote:
>
> As talked about in the first patch in this series, passing NULL as the
> 'mssg' argument to mbox_send_message() ends up causing confusion and
> quirky behavior inside the mailbox core. Despite this, there are a
> number of drivers that pass NULL.
>
> It is plausible that some of the drivers passing NULL may have been
> taking advantage of the quirks of the mailbox core. Specifically, they
> may have been taking advantage that calling "tx_done" wasn't truly
> necessary for NULL messages (it was a noop) or that NULL messages were
> passed onto the mailbox controller right away without queuing.
>
> This series introduces a new API call: mbox_ring_doorbell(). The new
> API call tries to mimic the specific quirks that were helpful in the
> old behavior and it's expected to be a nearly drop-in replacement.
>
> There are some subtle differences between the new call and the old
> behavior, but it's expected that all of these differences are only for
> cases where the old behavior made little sense. The description of the
> first patch details these differences.
>
> The series attempts to convert all in-tree users to stop passing NULL
> for mssg. As per above, there are some slight differences in behavior.
> If any of the patches are causing problems, they can safely be
> reverted while debugging the problems. Eventually, all code should be
> converted over to stop passing NULL mssg.
>
> Changes in v3:
> - Suggest mbox_ring_doorbell in the warning message
> - Updated patch description based on Cristian's response.
>
> Changes in v2:
> - Instead of just documenting NULL, introduce a new function
>
> Douglas Anderson (15):
> mailbox: Deprecate NULL mbox messages; Introduce mbox_ring_doorbell()
> ACPI: PCC: Use mbox_ring_doorbell() instead of NULL message
> firmware: arm_scmi: Use mbox_ring_doorbell() instead of NULL message
> firmware: imx-dsp: Use mbox_ring_doorbell() instead of NULL message
> firmware: tegra: bpmp: Use mbox_ring_doorbell() instead of NULL
> message
> irqchip/qcom-mpm: Use mbox_ring_doorbell() instead of NULL message
> remoteproc: xlnx: Use mbox_ring_doorbell() instead of NULL message
> rpmsg: qcom_glink_rpm: Use mbox_ring_doorbell() instead of NULL
> message
> rpmsg: glink: smem: Use mbox_ring_doorbell() instead of NULL message
> rpmsg: qcom_smd: Use mbox_ring_doorbell() instead of NULL message
> soc: qcom: aoss: Use mbox_ring_doorbell() instead of NULL message
> soc: qcom: smp2p: Use mbox_ring_doorbell() instead of NULL message
> soc: qcom: smsm: Use mbox_ring_doorbell() instead of NULL message
> soc: ti: wkup_m3_ipc: Use mbox_ring_doorbell() instead of NULL message
> drivers: firmware: xilinx: Use mbox_ring_doorbell() instead of NULL
> message
Just checking to see if there is any addional changes you need from me
on this series. It looks like it's -rc3 which is maybe an ideal time
for this series to get some linux-next bake time? A good number of the
patches in this series have Acks from maintainers so they could all go
in your tree, I think. For those that don't, I guess worst case they
just don't land right now and I can re-post them later. ...or if you
think they would be OK to pickup that would be cool too.
Thanks!
-Doug
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 00/15] mailbox: Stop sending NULL mailbox messages
2026-02-16 18:09 [PATCH v3 00/15] mailbox: Stop sending NULL mailbox messages Douglas Anderson
` (2 preceding siblings ...)
2026-03-09 15:19 ` [PATCH v3 00/15] mailbox: Stop sending NULL mailbox messages Doug Anderson
@ 2026-03-11 0:16 ` Doug Anderson
3 siblings, 0 replies; 7+ messages in thread
From: Doug Anderson @ 2026-03-11 0:16 UTC (permalink / raw)
To: jassisinghbrar
Cc: Frank.Li, Santosh Shilimkar, Sascha Hauer, andersson, arm-scmi,
cristian.marussi, daniel.baluta, festevam, imx, jay.buddhabhatti,
jonathanh, kernel, konradybcio, krzk, lenb, linux-acpi,
linux-arm-kernel, linux-arm-msm, linux-kernel, linux-remoteproc,
linux-tegra, lucaswei, marco.crivellari, mathieu.poirier,
michal.simek, nm, rafael, robh, shawn.guo, sudeep.holla, tglx,
thierry.reding
Hi,
On Mon, Feb 16, 2026 at 10:11 AM Douglas Anderson <dianders@chromium.org> wrote:
>
> As talked about in the first patch in this series, passing NULL as the
> 'mssg' argument to mbox_send_message() ends up causing confusion and
> quirky behavior inside the mailbox core. Despite this, there are a
> number of drivers that pass NULL.
>
> It is plausible that some of the drivers passing NULL may have been
> taking advantage of the quirks of the mailbox core. Specifically, they
> may have been taking advantage that calling "tx_done" wasn't truly
> necessary for NULL messages (it was a noop) or that NULL messages were
> passed onto the mailbox controller right away without queuing.
>
> This series introduces a new API call: mbox_ring_doorbell(). The new
> API call tries to mimic the specific quirks that were helpful in the
> old behavior and it's expected to be a nearly drop-in replacement.
>
> There are some subtle differences between the new call and the old
> behavior, but it's expected that all of these differences are only for
> cases where the old behavior made little sense. The description of the
> first patch details these differences.
>
> The series attempts to convert all in-tree users to stop passing NULL
> for mssg. As per above, there are some slight differences in behavior.
> If any of the patches are causing problems, they can safely be
> reverted while debugging the problems. Eventually, all code should be
> converted over to stop passing NULL mssg.
>
> Changes in v3:
> - Suggest mbox_ring_doorbell in the warning message
> - Updated patch description based on Cristian's response.
>
> Changes in v2:
> - Instead of just documenting NULL, introduce a new function
In case any mailbox client API users want to comment, Jassi has
proposed an alternative to this series:
https://lore.kernel.org/r/20260310234616.334498-1-jassisinghbrar@gmail.com/
Feel free to join the conversation over there. :-)
-Doug
^ permalink raw reply [flat|nested] 7+ messages in thread