mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] mailbox: mtk-cmdq: Fix error resume address and early task completion
@ 2026-12-01 11:26 Jason-JH Lin
  2026-12-01 11:26 ` [PATCH 1/2] mailbox: mtk-cmdq: Add mminfra_offset to the error resume address Jason-JH Lin
  2026-12-01 11:26 ` [PATCH 2/2] mailbox: mtk-cmdq: Wait for GCE to take the chained jump Jason-JH Lin
  0 siblings, 2 replies; 3+ messages in thread
From: Jason-JH Lin @ 2026-12-01 11:26 UTC (permalink / raw)
  To: Jassi Brar, Chun-Kuang Hu, AngeloGioacchino Del Regno
  Cc: Matthias Brugger, Jason-JH Lin, Paul-PL Chen, Zi-Hao Huang,
	Olivia Wen, Fei Shao, Chen-yu Tsai,
	Project_Global_Chrome_Upstream_Group, linux-kernel,
	linux-mediatek, linux-arm-kernel

From: Jason-jh Lin <jason-jh.lin@mediatek.com>

This series fixes two problems in the CMDQ mailbox driver's thread irq
handling.

Patch 1 makes the error path use cmdq_convert_gce_addr() when it
resumes the thread at the next task, so mminfra_offset is applied like
in every other write to CMDQ_THR_CURR_ADDR. Without it the thread
resumes from a wrong PC on SoCs with a non-zero mminfra_offset, such as
MT8196.

Patch 2 makes the irq handler wait until GCE has taken the trailing
jump of a finished task before completing it. A client that frees the
task buffer in its callback could otherwise cause an SMMU read fault
when GCE fetches the jump from the freed buffer.

The two patches touch adjacent code in cmdq_task_handle_error() and
need to be applied in this order.

Jason-jh Lin (1):
  mailbox: mtk-cmdq: Add mminfra_offset to the error resume address

Olivia Wen (1):
  mailbox: mtk-cmdq: Wait for GCE to take the chained jump

 drivers/mailbox/mtk-cmdq-mailbox.c | 50 +++++++++++++++++++++++++++++-
 1 file changed, 49 insertions(+), 1 deletion(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-12-01 11:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-01 11:26 [PATCH 0/2] mailbox: mtk-cmdq: Fix error resume address and early task completion Jason-JH Lin
2026-12-01 11:26 ` [PATCH 1/2] mailbox: mtk-cmdq: Add mminfra_offset to the error resume address Jason-JH Lin
2026-12-01 11:26 ` [PATCH 2/2] mailbox: mtk-cmdq: Wait for GCE to take the chained jump Jason-JH Lin

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®