On Fri, Aug 09, 2019 at 06:07:42PM +0100, Robin Murphy wrote: > Since we now use separate iommu_gather_ops for stage 1 and stage 2 > contexts, we may as well divide up the monolithic callback into its > respective stage 1 and stage 2 parts. > > Signed-off-by: Robin Murphy <robin.mur...@arm.com> > --- > drivers/iommu/arm-smmu.c | 66 ++++++++++++++++++++++------------------ > 1 file changed, 37 insertions(+), 29 deletions(-)
This will conflict with my iommu API batching stuff, but I can sort that out if/when it gets queued by Joerg. > - if (cfg->fmt != ARM_SMMU_CTX_FMT_AARCH64) { > - iova &= ~12UL; > - iova |= cfg->asid; > - do { > - writel_relaxed(iova, reg); > - iova += granule; > - } while (size -= granule); > - } else { > - iova >>= 12; > - iova |= (u64)cfg->asid << 48; > - do { > - writeq_relaxed(iova, reg); > - iova += granule >> 12; > - } while (size -= granule); > - } > - } else { > - reg += leaf ? ARM_SMMU_CB_S2_TLBIIPAS2L : > - ARM_SMMU_CB_S2_TLBIIPAS2; > - iova >>= 12; > + if (cfg->fmt != ARM_SMMU_CTX_FMT_AARCH64) { > + iova &= ~12UL; Oh baby. You should move code around more often, so I'm forced to take a second look! Can you cook a fix for this that we can route separately, please? I see it also made its way into qcom_iommu.c... Will _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu