Skip to content

iommu/arm-smmu: adreno-smmu page fault handling

Rob Clark dri-devel linux-arm-kernel linux-arm-msm linux-iommu lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest5 patches 14 repliesIn review
  2. v4 posting 2/26 patches 1 replySuperseded
  3. v4 posting 1/26 patches 4 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5iommu/arm-smmu: Add support for driver IOMMU fault handlersdrivers/iommu/arm/arm-smmu/arm-smmu.c+7 -21 reply
2/5iommu/arm-smmu-qcom: Add an adreno-smmu-priv callback to get pagefault infodrivers/iommu/arm/arm-smmu/arm-smmu-qcom.c drivers/iommu/arm/arm-smmu/arm-smmu.h include/linux/adreno-smmu-priv.h+49 -11 reply
3/5drm/msm: Improve the a6xx page fault handlerdrivers/gpu/drm/msm/adreno/a5xx_gpu.c drivers/gpu/drm/msm/adreno/a6xx_gpu.c drivers/gpu/drm/msm/msm_iommu.c +1 more+87 -84 replies
4/5iommu/arm-smmu-qcom: Add stall supportdrivers/iommu/arm/arm-smmu/arm-smmu-qcom.c include/linux/adreno-smmu-priv.h+40 -02 replies
5/5drm/msm: devcoredump iommu fault supportdrivers/gpu/drm/msm/adreno/a5xx_gpu.c drivers/gpu/drm/msm/adreno/a6xx_gpu.c drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c +8 more+186 -121 reply

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchWill DeaconJordan CrouseBjorn AnderssonJohn Stultz
SeriesT-b
1/5A-b R-b
2/5R-b
3/5A-b
4/5A-b R-b
5/5A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v5 thread

Cover letter [PATCH v5 0/5] iommu/arm-smmu: adreno-smmu page fault handling

From: Rob Clark <[email protected]>

This picks up an earlier series[1] from Jordan, and adds additional support needed to generate GPU devcore dumps on iova faults. Original description:

This is a stack to add an Adreno GPU specific handler for pagefaults. The first patch starts by wiring up report_iommu_fault for arm-smmu. The next patch adds a adreno-smmu-priv function hook to capture a handful of important debugging registers such as TTBR0, CONTEXTIDR, FSYNR0 and others. This is used by the third patch to print more detailed information on page fault such as the TTBR0 for the pagetable that caused the fault and the source of the fault as determined by a combination of the FSYNR1 register and an internal GPU register.

This code provides a solid base that we can expand on later for even more extensive GPU side page fault debugging capabilities.

v5: [Rob] Use RBBM_STATUS3.SMMU_STALLED_ON_FAULT to detect case where
GPU snapshotting needs to avoid crashdumper, and check the RBBM_STATUS3.SMMU_STALLED_ON_FAULT in GPU hang irq paths
v4: [Rob] Add support to stall SMMU on fault, and let the GPU driver
resume translation after it has had a chance to snapshot the GPUs state
v3: Always clear FSR even if the target driver is going to handle resume
v2: Fix comment wording and function pointer check per Rob Clark

[1] https://lore.kernel.org/dri-devel/[email protected]/

Jordan Crouse (3):
iommu/arm-smmu: Add support for driver IOMMU fault handlers iommu/arm-smmu-qcom: Add an adreno-smmu-priv callback to get pagefault
info
drm/msm: Improve the a6xx page fault handler

Rob Clark (2):
iommu/arm-smmu-qcom: Add stall support
drm/msm: devcoredump iommu fault support

 drivers/gpu/drm/msm/adreno/a5xx_gpu.c       |  23 +++-
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c       | 110 +++++++++++++++++++-
 drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c |  42 ++++++--
 drivers/gpu/drm/msm/adreno/adreno_gpu.c     |  15 +++
 drivers/gpu/drm/msm/msm_gem.h               |   1 +
 drivers/gpu/drm/msm/msm_gem_submit.c        |   1 +
 drivers/gpu/drm/msm/msm_gpu.c               |  48 +++++++++
 drivers/gpu/drm/msm/msm_gpu.h               |  17 +++
 drivers/gpu/drm/msm/msm_gpummu.c            |   5 +
 drivers/gpu/drm/msm/msm_iommu.c             |  22 +++-
 drivers/gpu/drm/msm/msm_mmu.h               |   5 +-
 drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c  |  50 +++++++++
 drivers/iommu/arm/arm-smmu/arm-smmu.c       |   9 +-
 drivers/iommu/arm/arm-smmu/arm-smmu.h       |   2 +
 include/linux/adreno-smmu-priv.h            |  38 ++++++-
 15 files changed, 367 insertions(+), 21 deletions(-)
Signature · 1 line
2.31.1