mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Douglas Anderson <dianders@chromium.org>
To: jassisinghbrar@gmail.com
Cc: Douglas Anderson <dianders@chromium.org>,
	lenb@kernel.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org, rafael@kernel.org
Subject: [PATCH v2 02/15] ACPI: PCC: Use mbox_ring_doorbell() instead of NULL message
Date: Sat,  7 Feb 2026 20:01:24 -0800	[thread overview]
Message-ID: <20260207200128.v2.2.Ibc0c2b7d0280f23aecade13c49dedc2bb7fdd7a2@changeid> (raw)
In-Reply-To: <20260208040240.1971442-1-dianders@chromium.org>

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().

From code inspection, it appears that this driver only ever sends NULL
messages and thus the conversion is straightforward. The only change
is to remove the call to mbox_chan_txdone(). The call wouldn't have
done anything in the past anyway (since chan->active_req was NULL) but
with doorbells it's officially documented to not be needed.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
Something seemed a little fishy in this code. The code seems to be a
_client_ of a mailbox, yet it was calling mbox_chan_txdone() which is
something mailbox _controllers_ are supposed to call when their
"txdone" interrupt goes off.

It appears that this client even reaches into the mailbox controller
and confirms that `txdone_irq` is set, which should mean that the
controller itself signals txdone.

If the mailbox controller is actually signaling "txdone" it should
ideally be improved to not do so for doorbell (NULL) messages, but it
won't matter much for this client since we only ever send doorbells
and don't care about the txdone callback.

(no changes since v1)

 drivers/acpi/acpi_pcc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/acpi/acpi_pcc.c b/drivers/acpi/acpi_pcc.c
index e3f302b9dee5..3d240ecd98f4 100644
--- a/drivers/acpi/acpi_pcc.c
+++ b/drivers/acpi/acpi_pcc.c
@@ -106,7 +106,7 @@ acpi_pcc_address_space_handler(u32 function, acpi_physical_address addr,
 	/* Write to Shared Memory */
 	memcpy_toio(data->pcc_chan->shmem, (void *)value, data->ctx.length);
 
-	ret = mbox_send_message(data->pcc_chan->mchan, NULL);
+	ret = mbox_ring_doorbell(data->pcc_chan->mchan);
 	if (ret < 0)
 		return AE_ERROR;
 
@@ -123,8 +123,6 @@ acpi_pcc_address_space_handler(u32 function, acpi_physical_address addr,
 		return AE_TIME;
 	}
 
-	mbox_chan_txdone(data->pcc_chan->mchan, ret);
-
 	memcpy_fromio(value, data->pcc_chan->shmem, data->ctx.length);
 
 	return AE_OK;
-- 
2.53.0.rc2.204.g2597b5adb4-goog


  parent reply	other threads:[~2026-02-08  4:04 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-08  4:01 [PATCH v2 00/15] mailbox: Stop sending NULL mailbox messages Douglas Anderson
2026-02-08  4:01 ` [PATCH v2 01/15] mailbox: Deprecate NULL mbox messages; Introduce mbox_ring_doorbell() Douglas Anderson
2026-02-09 15:40   ` Bjorn Andersson
2026-02-10  0:38   ` Jassi Brar
2026-02-08  4:01 ` Douglas Anderson [this message]
2026-02-08  4:01 ` [PATCH v2 03/15] firmware: arm_scmi: Use mbox_ring_doorbell() instead of NULL message Douglas Anderson
2026-02-09 16:45   ` Cristian Marussi
2026-02-08  4:01 ` [PATCH v2 04/15] firmware: imx-dsp: " Douglas Anderson
2026-02-09 15:52   ` Daniel Baluta
2026-02-08  4:01 ` [PATCH v2 05/15] firmware: tegra: bpmp: " Douglas Anderson
2026-02-08  4:01 ` [PATCH v2 06/15] irqchip/qcom-mpm: " Douglas Anderson
2026-02-08  4:01 ` [PATCH v2 07/15] remoteproc: xlnx: " Douglas Anderson
2026-02-09 15:40   ` Bjorn Andersson
2026-02-08  4:01 ` [PATCH v2 08/15] rpmsg: qcom_glink_rpm: " Douglas Anderson
2026-02-09 15:40   ` Bjorn Andersson
2026-02-08  4:01 ` [PATCH v2 09/15] rpmsg: glink: smem: " Douglas Anderson
2026-02-09 15:41   ` Bjorn Andersson
2026-02-08  4:01 ` [PATCH v2 10/15] rpmsg: qcom_smd: " Douglas Anderson
2026-02-09 15:41   ` Bjorn Andersson
2026-02-08  4:01 ` [PATCH v2 11/15] soc: qcom: aoss: " Douglas Anderson
2026-02-08  4:01 ` [PATCH v2 12/15] soc: qcom: smp2p: " Douglas Anderson
2026-02-08  4:01 ` [PATCH v2 13/15] soc: qcom: smsm: " Douglas Anderson
2026-02-08  4:01 ` [PATCH v2 14/15] soc: ti: wkup_m3_ipc: " Douglas Anderson
2026-02-08  4:01 ` [PATCH v2 15/15] drivers: firmware: xilinx: " Douglas Anderson

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=20260207200128.v2.2.Ibc0c2b7d0280f23aecade13c49dedc2bb7fdd7a2@changeid \
    --to=dianders@chromium.org \
    --cc=jassisinghbrar@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®