mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] iommu/sun50i: Don't report TLB prefetch walks as page faults
@ 2026-11-10  6:05 Arun Iyengar via B4 Relay
  2026-11-10  6:05 ` [PATCH 1/2] iommu/sun50i: Don't report TLB prefetches of unmapped pages as faults Arun Iyengar via B4 Relay
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Arun Iyengar via B4 Relay @ 2026-11-10  6:05 UTC (permalink / raw)
  To: Joerg Roedel (AMD),
	Will Deacon, Robin Murphy, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland, Maxime Ripard
  Cc: iommu, linux-arm-kernel, linux-sunxi, linux-kernel

On an H616 with a display scanning out, the IOMMU reports page faults
with master -1 at the IOVA right after the end of the framebuffer: once
at the first fbcon frame, and then once per frame for a while after
each TLB flush, e.g. while a video decoder frees its buffers. They are
failed walks of the TLB prefetcher, which the hardware flags with bit 31
of the page table interrupt registers and no master bit. Patch 1 stops
reporting them. Patch 2 makes the remaining fault messages say which
walk failed and what the interrupt register held.

Tested on an Orange Pi Zero2 (H616) with HDMI forced on at 1024x768 and
three 4K H.264 decodes through cedrus, on 7.3 kernels with and without
the patches:
- without: 214 "Page fault ... (master -1, dir rd)" lines;
- with: none, no "Page fault" line at all, and no decode errors or
  timeouts.
Since the patched kernel prints every fault that is not a masterless
prefetch walk, this also shows that the hardware sets bit 31 for these
walks.

These patches were developed with Claude (Anthropic) as a coding
assistant. It investigated the problem and wrote the code and the commit
messages; I reviewed them, and they were tested on an Orange Pi Zero2
(H616) as described above.

---
Arun Iyengar (2):
      iommu/sun50i: Don't report TLB prefetches of unmapped pages as faults
      iommu/sun50i: Print the page table level and status of a fault

 drivers/iommu/sun50i-iommu.c | 50 ++++++++++++++++++++++++++++++++++----------
 1 file changed, 39 insertions(+), 11 deletions(-)
---
base-commit: 2cf4be57b301ed2d7af82e70cff5dfd96894d8de
change-id: 20261110-sun50i-iommu-prefetch-85cc9ecff559

Best regards,
--  
Arun Iyengar <aiyengar1990@gmail.com>



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

end of thread, other threads:[~2026-11-10 16:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-10  6:05 [PATCH 0/2] iommu/sun50i: Don't report TLB prefetch walks as page faults Arun Iyengar via B4 Relay
2026-11-10  6:05 ` [PATCH 1/2] iommu/sun50i: Don't report TLB prefetches of unmapped pages as faults Arun Iyengar via B4 Relay
2026-11-10  6:05 ` [PATCH 2/2] iommu/sun50i: Print the page table level and status of a fault Arun Iyengar via B4 Relay
2026-11-10 16:04 ` [PATCH 0/2] iommu/sun50i: Don't report TLB prefetch walks as page faults Jernej Škrabec

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®