On 17.07.2024 6:36 PM, Rob Clark wrote: > From: Rob Clark <robdclark@xxxxxxxxxxxx> > > In the case of iova fault triggered devcore dumps, include additional > debug information based on what we think is the current page tables, > including the TTBR0 value (which should match what we have in > adreno_smmu_fault_info unless things have gone horribly wrong), and > the pagetable entries traversed in the process of resolving the > faulting iova. > > Signed-off-by: Rob Clark <robdclark@xxxxxxxxxxxx> > --- > drivers/gpu/drm/msm/adreno/adreno_gpu.c | 10 ++++++++++ > drivers/gpu/drm/msm/msm_gpu.c | 9 +++++++++ > drivers/gpu/drm/msm/msm_gpu.h | 8 ++++++++ > drivers/gpu/drm/msm/msm_iommu.c | 22 ++++++++++++++++++++++ > drivers/gpu/drm/msm/msm_mmu.h | 3 ++- > 5 files changed, 51 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c > index 99661af8d941..422dae873b6b 100644 > --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c > +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c > @@ -861,6 +861,16 @@ void adreno_show(struct msm_gpu *gpu, struct msm_gpu_state *state, > drm_printf(p, " - dir=%s\n", info->flags & IOMMU_FAULT_WRITE ? "WRITE" : "READ"); > drm_printf(p, " - type=%s\n", info->type); > drm_printf(p, " - source=%s\n", info->block); > + > + /* Information extracted from what we think are the current I'll keep poking you for not using /* * foobar instead :P > + * pgtables. Hopefully the TTBR0 matches what we've extracted > + * from the SMMU registers in smmu_info! > + */ > + drm_puts(p, "pgtable-fault-info:\n"); > + drm_printf(p, " - ttbr0: %.16llx\n", (u64)info->pgtbl_ttbr0);> + drm_printf(p, " - asid: %d\n", info->asid); 0x%08x? Konrad