Re: [PATCH v4 2/2] iommu/arm-smmu: add support for iova_to_phys through ATS1PR

2014-10-01 Thread Mitchel Humpherys
On Wed, Oct 01 2014 at 01:27:27 AM, Arnd Bergmann wrote: > On Tuesday 30 September 2014 18:28:13 Mitchel Humpherys wrote: >> + if (readl_poll_timeout_atomic(cb_base + ARM_SMMU_CB_ATSR, tmp, >> + !(tmp & ATSR_ACTIVE), 50, 100)) { >> > > This looks really bad. >

Re: [PATCH v4 2/2] iommu/arm-smmu: add support for iova_to_phys through ATS1PR

2014-10-01 Thread Arnd Bergmann
On Tuesday 30 September 2014 18:28:13 Mitchel Humpherys wrote: > + if (readl_poll_timeout_atomic(cb_base + ARM_SMMU_CB_ATSR, tmp, > + !(tmp & ATSR_ACTIVE), 50, 100)) { > This looks really bad. You are doing up to 50 100us delays, each of which can be much long

[PATCH v4 2/2] iommu/arm-smmu: add support for iova_to_phys through ATS1PR

2014-09-30 Thread Mitchel Humpherys
Currently, we provide the iommu_ops.iova_to_phys service by doing a table walk in software to translate IO virtual addresses to physical addresses. On SMMUs that support it, it can be useful to ask the SMMU itself to do the translation. This can be used to warm the TLBs for an SMMU. It can also be