From: Jason-JH Lin <jason-jh.lin@mediatek.com>
To: Jassi Brar <jassisinghbrar@gmail.com>,
Chun-Kuang Hu <chunkuang.hu@kernel.org>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>,
Jason-JH Lin <jason-jh.lin@mediatek.com>,
Paul-PL Chen <paul-pl.chen@mediatek.com>,
Zi-Hao Huang <zi-hao.huang@mediatek.com>,
Olivia Wen <olivia.wen@mediatek.com>,
Fei Shao <fshao@chromium.org>, Chen-yu Tsai <wenst@chromium.org>,
<Project_Global_Chrome_Upstream_Group@mediatek.com>,
<linux-kernel@vger.kernel.org>,
<linux-mediatek@lists.infradead.org>,
<linux-arm-kernel@lists.infradead.org>
Subject: [PATCH 0/2] mailbox: mtk-cmdq: Fix error resume address and early task completion
Date: Tue, 1 Dec 2026 19:26:09 +0800 [thread overview]
Message-ID: <20261201112707.644513-1-jason-jh.lin@mediatek.com> (raw)
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
next reply other threads:[~2026-12-01 11:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 11:26 Jason-JH Lin [this message]
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
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=20261201112707.644513-1-jason-jh.lin@mediatek.com \
--to=jason-jh.lin@mediatek.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chunkuang.hu@kernel.org \
--cc=fshao@chromium.org \
--cc=jassisinghbrar@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=olivia.wen@mediatek.com \
--cc=paul-pl.chen@mediatek.com \
--cc=wenst@chromium.org \
--cc=zi-hao.huang@mediatek.com \
/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®