lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260207200128.v2.2.Ibc0c2b7d0280f23aecade13c49dedc2bb7fdd7a2@changeid>
Date: Sat,  7 Feb 2026 20:01:24 -0800
From: Douglas Anderson <dianders@...omium.org>
To: jassisinghbrar@...il.com
Cc: Douglas Anderson <dianders@...omium.org>,
	lenb@...nel.org,
	linux-acpi@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	rafael@...nel.org
Subject: [PATCH v2 02/15] ACPI: PCC: Use mbox_ring_doorbell() instead of NULL message

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@...omium.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ