From: Jiaxing Hu <gahing@gahingwoo.com>
To: chaoyi.chen@rock-chips.com
Cc: tomeu@tomeuvizoso.net, heiko@sntech.de,
linux-rockchip@lists.infradead.org, iommu@lists.linux.dev,
Jiaxing Hu <gahing@gahingwoo.com>
Subject: Re: [RFC PATCH 4/9] iommu/rockchip: skip orphaned-fault banks in rk_iommu_is_stall_active
Date: Sat, 18 Jul 2026 15:13:41 +1200 [thread overview]
Message-ID: <20260718031341.3369185-1-gahing@gahingwoo.com> (raw)
In-Reply-To: <b7d71a44-eb65-4b09-a378-225249276f65@rock-chips.com>
Hi Chaoyi, thanks for looking.
You're right -- this was treating the symptom. I traced it:
The bank carries PAGE_FAULT_ACTIVE from boot firmware, and rk_iommu_enable()
runs rk_iommu_enable_stall() *before* rk_iommu_force_reset(). So the stale
fault is still set when enable_stall() polls for STALL_ACTIVE, and that bank
never stalls -- that's the timeout the two "skip" patches worked around.
(On the RK3576 NPU force_reset() was itself returning -EFAULT, "MMU_DTE_ADDR
is not functioning", until the MMU clocks were fixed, so the fault never got
cleared that way either.)
For v2 I dropped both skip patches and instead acknowledge the stale fault
with CMD_PAGE_FAULT_DONE before enabling stall, so every bank starts from a
clean state and the normal stall sequence applies to all of them -- which is
what you were getting at, deal with the fault rather than route around it.
Confirmed on a ROCK 4D: no more raw-reset error, no stall timeout, the NPU
brings up and runs to completion.
v2:
https://lore.kernel.org/all/20260718031146.3368811-1-gahing@gahingwoo.com/
Thanks,
Jiaxing
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2026-07-18 3:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 8:50 [RFC PATCH 0/9] accel/rocket: RK3576 NPU (RKNN) enablement Jiaxing Hu
2026-07-17 8:50 ` [RFC PATCH 1/9] dt-bindings: npu: rockchip: add rockchip,rk3576-rknn-core Jiaxing Hu
2026-07-17 10:02 ` Chaoyi Chen
2026-07-17 8:50 ` [RFC PATCH 2/9] pmdomain/rockchip: add optional per-domain power-on settle delay Jiaxing Hu
2026-07-17 8:50 ` [RFC PATCH 3/9] pmdomain/rockchip: cycle optional power-domain resets on power-on Jiaxing Hu
2026-07-17 8:50 ` [RFC PATCH 4/9] iommu/rockchip: skip orphaned-fault banks in rk_iommu_is_stall_active Jiaxing Hu
2026-07-17 10:15 ` Chaoyi Chen
2026-07-18 3:13 ` Jiaxing Hu [this message]
2026-07-17 8:50 ` [RFC PATCH 5/9] iommu/rockchip: skip orphaned-fault banks in CMD_ENABLE_STALL dispatch Jiaxing Hu
2026-07-17 8:50 ` [RFC PATCH 6/9] iommu/rockchip: take all DT clocks Jiaxing Hu
2026-07-17 10:19 ` Chaoyi Chen
2026-07-17 8:50 ` [RFC PATCH 7/9] accel/rocket: add RK3576 NPU (RKNN) support Jiaxing Hu
2026-07-17 10:29 ` Chaoyi Chen
2026-07-17 8:50 ` [RFC PATCH 8/9] arm64: dts: rockchip: rk3576: add NPU (RKNN) nodes Jiaxing Hu
2026-07-17 8:50 ` [RFC PATCH 9/9] arm64: dts: rockchip: rk3576-rock-4d: enable NPU Jiaxing Hu
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=20260718031341.3369185-1-gahing@gahingwoo.com \
--to=gahing@gahingwoo.com \
--cc=chaoyi.chen@rock-chips.com \
--cc=heiko@sntech.de \
--cc=iommu@lists.linux.dev \
--cc=linux-rockchip@lists.infradead.org \
--cc=tomeu@tomeuvizoso.net \
/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