[PATCH v2 9/9] iommu/arm-smmu: add support for non-pci devices

2015-07-06 Thread Zhen Lei
This patch support a master with multiple stream IDs, but doesn't support a master behinds more than one SMMUs. Signed-off-by: Zhen Lei --- drivers/iommu/arm-smmu-v3.c | 39 +-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/arm-s

[PATCH v2 8/9] iommu/arm-smmu: rename __arm_smmu_get_pci_sid

2015-07-06 Thread Zhen Lei
Remove the words "pci", to make this function can also be used by non-pci devices. Signed-off-by: Zhen Lei --- drivers/iommu/arm-smmu-v3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c index 39c55f6..274d059 1006

[PATCH v2 3/9] iommu/arm-smmu: fix the values of ARM64_TCR_IRGN0_SHIFT and ARM64_TCR_ORGN0_SHIFT

2015-07-06 Thread Zhen Lei
In SMMU_CBn_TCR when LPAE enabled, the offset of IRGN0 is 8, the offset of ORGN0 is 10. Signed-off-by: Zhen Lei --- drivers/iommu/arm-smmu-v3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c index 48be7eb..0723034

[PATCH v2 1/9] iommu/arm-smmu: fix the assignment of L1 table log2entries

2015-07-06 Thread Zhen Lei
Add a new local variable to store the value of L1 talbe size, so that it will not conflict with L1 talbe log2entries(stored in variable size). Signed-off-by: Zhen Lei --- drivers/iommu/arm-smmu-v3.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/iom

[PATCH v2 2/9] iommu/arm-smmu: fix the index calculation of strtab

2015-07-06 Thread Zhen Lei
The element size of cfg->strtab is just one DWORD, should use multiply operation. Signed-off-by: Zhen Lei --- drivers/iommu/arm-smmu-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c index 56a1fbe..48be7eb 100644 --

[PATCH v2 0/9] bugfixs and add support for non-pci devices

2015-07-06 Thread Zhen Lei
Changelog: v1 -> v2: update the implementation of patch 1/9 according to Will Deacon's suggestion. update the comment of patch 3/9 and 4/9. use arm_smmu_options to skip the execution of command CMD_PREFETCH_CONFIG, see patch 5/9. patch 6/9 is base on Laurent's series, to support probe deferral. pa

[PATCH v2 5/9] iommu/arm-smmu: skip the execution of CMD_PREFETCH_CONFIG

2015-07-06 Thread Zhen Lei
Hisilicon SMMUv3 devices treat CMD_PREFETCH_CONFIG as a illegal command, execute it will trigger GERROR interrupt. Although the gerror code manage to turn the prefetch into a SYNC, and the system can continue to run normally, but it's ugly to print error information. Signed-off-by: Zhen Lei ---

[PATCH v2 7/9] iommu/arm-smmu: remove arm_smmu_devices

2015-07-06 Thread Zhen Lei
It can be replaced by of_iommu_list(in of_iommu.c). Signed-off-by: Zhen Lei --- drivers/iommu/arm-smmu-v3.c | 22 ++ 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c index c569539..39c55f6 100644 --- a/dr

[PATCH v2 4/9] iommu/arm-smmu: enlarge STRTAB_L1_SZ_SHIFT to support larger sidsize

2015-07-06 Thread Zhen Lei
Because we will choose the minimum value between STRTAB_L1_SZ_SHIFT and IDR1.SIDSIZE, so enlarge STRTAB_L1_SZ_SHIFT will not impact the platforms whose IDR1.SIDSIZE is smaller than old STRTAB_L1_SZ_SHIFT value. Signed-off-by: Zhen Lei --- drivers/iommu/arm-smmu-v3.c | 5 +++-- 1 file changed, 3

[PATCH v2 6/9] iommu/arm-smmu: to support probe deferral

2015-07-06 Thread Zhen Lei
For pci devices, only the root nodes have "iommus" property. So we should traverse all of its sub nodes in of_xlate. Signed-off-by: Zhen Lei --- drivers/iommu/arm-smmu-v3.c | 119 +--- 1 file changed, 89 insertions(+), 30 deletions(-) diff --git a/drivers

Re: [PATCH v3 3/7] dma-mapping: pci: add pci_(un)map_resource

2015-07-06 Thread Will Davis
> On Wed, Jul 01, 2015 at 11:06:06AM -0500, Bjorn Helgaas wrote: > > On Fri, May 29, 2015 at 12:14:42PM -0500, wdavis@... wrote: > > > From: Will Davis > > > > > > Simply route these through to the new dma_(un)map_resource APIs. > > > > > > Signed-off-by: Will Davis > > > Reviewed-by: Terence