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>, <stable@vger.kernel.org>
Subject: [PATCH 1/2] mailbox: mtk-cmdq: Add mminfra_offset to the error resume address
Date: Tue, 1 Dec 2026 19:26:10 +0800 [thread overview]
Message-ID: <20261201112707.644513-2-jason-jh.lin@mediatek.com> (raw)
In-Reply-To: <20261201112707.644513-1-jason-jh.lin@mediatek.com>
From: Jason-jh Lin <jason-jh.lin@mediatek.com>
After an error, cmdq_task_handle_error() moves the thread PC to the
next task with next_task->pa_base >> shift. All other writes of a task
address to CMDQ_THR_CURR_ADDR go through cmdq_convert_gce_addr(), which
also adds mminfra_offset. On SoCs with a non-zero mminfra_offset (e.g.
MT8196, SZ_2G), the thread resumes from the wrong PC after an error.
Use cmdq_convert_gce_addr() here as well.
Fixes: ddb5d0c941c6 ("mailbox: mtk-cmdq: Add mminfra_offset configuration for DRAM transaction")
Cc: stable@vger.kernel.org
Signed-off-by: Jason-jh Lin <jason-jh.lin@mediatek.com>
---
drivers/mailbox/mtk-cmdq-mailbox.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c
index f1eb886368cc..191122b4c94f 100644
--- a/drivers/mailbox/mtk-cmdq-mailbox.c
+++ b/drivers/mailbox/mtk-cmdq-mailbox.c
@@ -300,7 +300,7 @@ static void cmdq_task_handle_error(struct cmdq_task *task)
next_task = list_first_entry_or_null(&thread->task_busy_list,
struct cmdq_task, list_entry);
if (next_task)
- writel(next_task->pa_base >> cmdq->pdata->shift,
+ writel(cmdq_convert_gce_addr(next_task->pa_base, cmdq->pdata),
thread->base + CMDQ_THR_CURR_ADDR);
cmdq_thread_resume(thread);
}
--
2.43.0
next prev parent 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 [PATCH 0/2] mailbox: mtk-cmdq: Fix error resume address and early task completion Jason-JH Lin
2026-12-01 11:26 ` Jason-JH Lin [this message]
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-2-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=stable@vger.kernel.org \
--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®