aboutsummaryrefslogtreecommitdiff
path: root/drivers/iommu/arm-smmu.c
AgeCommit message (Collapse)Author
2015-07-17iommu/arm-smmu: Remove PCI related codeJon Medhurst
The features to support this aren't in Linux 3.10 Signed-off-by: Jon Medhurst <tixy@linaro.org>
2015-07-17iommu/arm-smmu: Remove iommu_capable implemnationJon Medhurst
The iommu_capable API wasn't introduced until 3.18. Signed-off-by: Jon Medhurst <tixy@linaro.org>
2015-07-17iommu: arm-smmu: set a more appropriate DMA maskRobin Murphy
Since we use dma_map_page() as an architecture-independent means of making page table updates visible to non-coherent SMMUs, we need to have a suitable DMA mask set to discourage the DMA mapping layer from creating bounce buffers and flushing those instead, if said page tables happen to lie outside the default 32-bit mask. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Jon Medhurst <tixy@linaro.org>
2015-07-17iommu/arm-smmu: don't touch the secure STLBIALL registerMitchel Humpherys
Currently we do a STLBIALL when we initialize the SMMU. However, in some configurations that register is not supposed to be touched and is marked as "Secure only" in the spec. Rip it out. Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org> Signed-off-by: Will Deacon <will.deacon@arm.com> (cherry picked from commit 3c8567d1cac0fa4c44ddcf0a956cae0bf2a348f3) Signed-off-by: Jon Medhurst <tixy@linaro.org>
2015-07-17iommu/arm-smmu: make use of generic LPAE allocatorWill Deacon
The ARM SMMU can walk LPAE page tables, so make use of the generic allocator. Signed-off-by: Will Deacon <will.deacon@arm.com> (cherry picked from commit 518f7136244c167538f732691be589959310b295) Signed-off-by: Jon Medhurst <tixy@linaro.org>
2015-07-17iommu/arm-smmu: add support for DOMAIN_ATTR_NESTING attributeWill Deacon
When domains are set with the DOMAIN_ATTR_NESTING flag, we must ensure that we allocate them to stage-2 context banks if the hardware permits it. This patch adds support for the attribute to the ARM SMMU driver, with the actual stage being determined depending on the features supported by the hardware. Signed-off-by: Will Deacon <will.deacon@arm.com> (cherry picked from commit c752ce45b213de8532baaf987ba930638f77c439) Signed-off-by: Jon Medhurst <tixy@linaro.org>
2015-07-17iommu/arm-smmu: Play nice on non-ARM/SMMU systemsThierry Reding
Currently the driver registers IOMMU bus operations for all busses even if no ARM SMMU is present on a system. Depending on the driver probing order this prevents the driver for the real IOMMU to register itself as the bus-wide IOMMU. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Will Deacon <will.deacon@arm.com> (cherry picked from commit 0e7d37adbe45404a76d05d4ef11544f23cf639dd) Signed-off-by: Jon Medhurst <tixy@linaro.org>
2015-07-17iommu/arm-smmu: add IOMMU_CAP_NOEXEC to the ARM SMMU driverAntonios Motakis
The ARM SMMU supports the IOMMU_NOEXEC protection flag. Add the corresponding IOMMU capability. Signed-off-by: Antonios Motakis <a.motakis@virtualopensystems.com> Signed-off-by: Will Deacon <will.deacon@arm.com> (cherry picked from commit 0029a8dd6c807e04b119ec9416510d30936f45e6) Signed-off-by: Jon Medhurst <tixy@linaro.org>
2015-07-17iommu/arm-smmu: change IOMMU_EXEC to IOMMU_NOEXECAntonios Motakis
Exposing the XN flag of the SMMU driver as IOMMU_NOEXEC instead of IOMMU_EXEC makes it enforceable, since for IOMMUs that don't support the XN flag pages will always be executable. Signed-off-by: Antonios Motakis <a.motakis@virtualopensystems.com> Acked-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Will Deacon <will.deacon@arm.com> (cherry picked from commit a720b41c41f5a7e4c51558cf087882c57331581f) Signed-off-by: Jon Medhurst <tixy@linaro.org>
2015-07-17iommu/arm-smmu: Copy code from Linux 3.18Jon Medhurst
Copy contents of drivers/iommu/arm-smmu.c from Linux 3.18 because cherry-picking individual commits is too painful, especially as they contain changes to other drivers and APIs. Signed-off-by: Jon Medhurst <tixy@linaro.org>
2015-07-17iommu/arm: Add support for ARM Ltd. System MMU architectureWill Deacon
This patch adds support for SMMUs implementing the ARM System MMU architecture versions 1 or 2. Both arm and arm64 are supported, although the v7s descriptor format is not used. Cc: Rob Herring <robherring2@gmail.com> Cc: Andreas Herrmann <andreas.herrmann@calxeda.com> Cc: Olav Haugan <ohaugan@codeaurora.org> Cc: Joerg Roedel <joro@8bytes.org> Signed-off-by: Will Deacon <will.deacon@arm.com> Acked-by: Andreas Herrmann <andreas.herrmann@calxeda.com> Signed-off-by: Joerg Roedel <joro@8bytes.org> (cherry picked from commit 45ae7cff3684ab45f57fc13fc242c8546536a84e) Signed-off-by: Jon Medhurst <tixy@linaro.org>