Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/msm: avoid flood of kernel logs on faults

87e956e9 changed the fault handler to return -ENOSYS, which causes the
iommu driver to print out a huge splat. Which wouldn't be quite so bad
if nothing ever faulted. But seems like some EXA composite operations
generate quite a lot of (seemingly harmless) faults. That is probably a
userspace problem, but the huge increase in verbosity from iommu fault
dumps makes things kind of unusable.

We probably should actually log *some* message (not conditional on
drm.debug). But ratelimit it.

Signed-off-by: Rob Clark <robdclark@gmail.com>

Rob Clark 6814dbf9 a284e9d1

+2 -2
+2 -2
drivers/gpu/drm/msm/msm_iommu.c
··· 27 27 static int msm_fault_handler(struct iommu_domain *iommu, struct device *dev, 28 28 unsigned long iova, int flags, void *arg) 29 29 { 30 - DBG("*** fault: iova=%08lx, flags=%d", iova, flags); 31 - return -ENOSYS; 30 + pr_warn_ratelimited("*** fault: iova=%08lx, flags=%d\n", iova, flags); 31 + return 0; 32 32 } 33 33 34 34 static int msm_iommu_attach(struct msm_mmu *mmu, const char **names, int cnt)