diff --git a/drivers/iommu/io-pgtable-arm.c b/drivers/iommu/io-pgtable-arm.c index 72dcdd468cf3..244ec6bb1d9f 100644 --- a/drivers/iommu/io-pgtable-arm.c +++ b/drivers/iommu/io-pgtable-arm.c @@ -444,9 +444,10 @@ static arm_lpae_iopte arm_lpae_prot_to_pte(struct arm_lpae_io_pgtable *data, * "outside the GPU" (i.e. either the Inner or System domain in CPU * terms, depending on coherency). */ - if (prot & IOMMU_CACHE && data->iop.fmt != ARM_MALI_LPAE) + if (prot & IOMMU_CACHE || + (data->iop.fmt == ARM_MALI_LPAE && !data->iop.cfg.coherent_walk)) pte |= ARM_LPAE_PTE_SH_IS; - else + else if (data->iop.fmt == ARM_MALI_LPAE) pte |= ARM_LPAE_PTE_SH_OS; if (prot & IOMMU_NOEXEC)