summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/arm-smmu-v3.c
Commit message (Collapse)AuthorAgeFilesLines
* iommu/arm-smmu: Skip the execution of CMD_PREFETCH_CONFIGZhen Lei2015-07-081-1/+31
| | | | | | | | | | | 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 <thunder.leizhen@huawei.com> [will: extended binding documentation] Signed-off-by: Will Deacon <will.deacon@arm.com>
* iommu/arm-smmu: Enlarge STRTAB_L1_SZ_SHIFT to support larger sidsizeZhen Lei2015-07-081-2/+3
| | | | | | | | | 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 <thunder.leizhen@huawei.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
* iommu/arm-smmu: Fix the values of ARM64_TCR_{I,O}RGN0_SHIFTZhen Lei2015-07-081-2/+2
| | | | | | | | | | | | The arm64 CPU architecture defines TCR[8:11] as holding the inner and outer memory attributes for TTBR0. This patch fixes the ARM SMMUv3 driver to pack these bits into the context descriptor, rather than picking up the TTBR1 attributes as it currently does. Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
* iommu/arm-smmu: Fix LOG2SIZE setting for 2-level stream tablesWill Deacon2015-07-081-8/+9
| | | | | | | | | | | | | STRTAB_BASE_CFG.LOG2SIZE should be set to log2(entries), where entries is the *total* number of entries in the stream table, not just the first level. This patch fixes the register setting, which was previously being set to the size of the l1 thanks to a multi-use "size" variable. Reported-by: Zhen Lei <thunder.leizhen@huawei.com> Tested-by: Zhen Lei <thunder.leizhen@huawei.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
* iommu/arm-smmu: Fix the index calculation of strtabZhen Lei2015-07-081-1/+1
| | | | | | | | | The element size of cfg->strtab is just one DWORD, so we should use a multiply operation instead of a shift when calculating the level 1 index. Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
* iommu/arm-smmu: Delete an unnecessary check before the function call ↵Markus Elfring2015-06-291-2/+1
| | | | | | | | | | | | | "free_io_pgtable_ops" The free_io_pgtable_ops() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
* iommu/arm-smmu: Add initial driver support for ARM SMMUv3 devicesWill Deacon2015-05-291-0/+2670
Version three of the ARM SMMU architecture introduces significant changes and improvements over previous versions of the specification, necessitating a new driver in the Linux kernel. The main change to the programming interface is that the majority of the configuration data has been moved from MMIO registers to in-memory data structures, with communication between the CPU and the SMMU being mediated via in-memory circular queues. This patch adds an initial driver for SMMUv3 to Linux. We currently support pinned stage-1 (DMA) and stage-2 (KVM VFIO) mappings using the generic IO-pgtable code. Cc: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
OpenPOWER on IntegriCloud