Re: [PATCH v2] mailbox: pcc: Fix command timeout due to missed interrupt

From: lihuisong (C)

Date: Thu Jul 09 2026 - 09:27:15 EST



On 7/9/2026 8:24 PM, Sudeep Holla wrote:
On Thu, Jul 09, 2026 at 07:41:15PM +0800, Huisong Li wrote:
PCC command execution can time out when a fast platform completes a
transaction and signals the platform interrupt before pcc_send_data()
marks the channel as in use. For shared platform interrupts, the type 3
handler uses chan_in_use to decide whether the interrupt belongs to the
channel. If it observes false, it ignores the completion and the caller
waits until timeout.

Publish chan_in_use before ringing the doorbell. Use WRITE_ONCE() for
the lockless flag update and READ_ONCE() in the interrupt handler when
filtering shared interrupts. The following ordered MMIO accessor used for
the doorbell keeps the earlier store visible before the platform is
notified.

Clear chan_in_use with WRITE_ONCE() when completing the transaction,
matching the lockless flag protocol used by the interrupt and send paths.

Fixes: 3db174e478cb ("mailbox: pcc: Support shared interrupt for multiple subspaces")
Signed-off-by: Sudeep Holla <sudeep.holla@xxxxxxxxxx>
Signed-off-by: Huisong Li <lihuisong@xxxxxxxxxx>
Reviewed-by: Sudeep Holla <sudeep.holla@xxxxxxxxxx>
Sorry if I gave mixed feedback, you can't have both my signoff and reviewed-by
at the same time. You need to drop one of them.
Sorry, will drop signoff.