[PATCH v3 0/4] iommu/rockchip: page fault and reset handling fixes
From: Arun Iyengar via B4 Relay
Date: Sat Dec 05 2026 - 20:17:58 EST
Fixes for the Rockchip IOMMU, found on an Orange Pi 5 (RK3588S) with
codec jobs that fault (Hantro VEPU121 JPEG encoder, rkvdec VDPU381).
Patch 1 fails probe when an MMU bank cannot be mapped.
Patch 2 rate-limits the page fault reports, not BUS_ERROR.
Patch 3 fixes the swapped poll period and timeout of FORCE_RESET.
Patch 4 makes the stall and paging helpers work per bank.
The faulting encoder job itself is recovered by the Hantro series
"media: verisilicon: Recover the Rockchip VPUs from faults and
timeouts":
https://lore.kernel.org/r/20261113-hantro-robust-v3-0-82383c722ad2@xxxxxxxxx
Tested on the Orange Pi 5. In a page fault storm from bad JPEG encode
jobs the page fault reports are rate-limited (10 runs). With a
devicetree in which one of three banks cannot be mapped, probe fails.
Developed with Claude (Anthropic), which wrote the code and the commit
messages; I reviewed every change.
Signed-off-by: Arun Iyengar <aiyengar1990@xxxxxxxxx>
---
Changes in v3:
- New patch 1: fail probe if an MMU bank cannot be mapped.
- Patch 2: don't rate-limit BUS_ERROR (Joerg Roedel).
- Patch 4: rewrite the commit message, problem first (Joerg Roedel).
- Link to v2: https://patch.msgid.link/20261203-iommu-rockchip-faults-v2-0-40e11e3132ef@xxxxxxxxx
Changes in v2:
- Drop v1 patch 1 (log_iova() on a reset IOMMU): superseded by
b62f4603b0d5 ("iommu/rockchip: do not walk the page tables of a
disabled MMU").
- Drop v1 patch 5 (hold the master in a fault storm): it masked the
fault interrupt, and Sashiko found races in it; the cause is fixed in
the Hantro series above.
- Rebase on iommu next.
- Add a Fixes tag to the bank patch (Sashiko).
- Shorter commit messages and comments.
- Link to v1: https://patch.msgid.link/20261110-iommu-rockchip-faults-v1-0-b1dda574dbb8@xxxxxxxxx
---
Arun Iyengar (4):
iommu/rockchip: Fail probe if an MMU bank cannot be mapped
iommu/rockchip: Rate-limit the page fault reports
iommu/rockchip: Fix the poll period and timeout of FORCE_RESET
iommu/rockchip: Don't skip a bank whose state differs from the others
drivers/iommu/rockchip-iommu.c | 79 ++++++++++++++++++++++++++++++------------
1 file changed, 56 insertions(+), 23 deletions(-)
---
base-commit: 052bac98639386c83fc5d6d74a645fd993855fbc
change-id: 20261110-iommu-rockchip-faults-0c1e41c33ed7
Best regards,
--
Arun Iyengar <aiyengar1990@xxxxxxxxx>