aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu/ipmmu-vmsa.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-07-07iommu: Constify struct iommu_opsThierry Reding1-1/+1
This structure is read-only data and should never be modified. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Joerg Roedel <jroedel@suse.de>
2014-05-26arm/ipmmu-vmsa: Fix compile errorJoerg Roedel1-1/+1
The function arm_iommu_create_mapping lost the order parameter. Remove it from this IOMMU driver too to make it build. Signed-off-by: Joerg Roedel <jroedel@suse.de>
2014-05-26iommu/ipmmu-vmsa: Support clearing mappingsLaurent Pinchart1-4/+186
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
2014-05-26iommu/ipmmu-vmsa: Remove stage 2 PTE bits definitionsLaurent Pinchart1-8/+0
We don't support stage 2 translation yet. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
2014-05-26iommu/ipmmu-vmsa: Support 2MB mappingsLaurent Pinchart1-3/+29
Add support for 2MB block mappings at the PMD level. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
2014-05-26iommu/ipmmu-vmsa: Rewrite page table managementLaurent Pinchart1-107/+86
The IOMMU core will only call us with page sizes advertized as supported by the driver. We can thus simplify the code by removing loops over PGD and PMD entries. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
2014-05-26iommu/ipmmu-vmsa: PMD is never folded, PUD always isLaurent Pinchart1-57/+9
The driver only supports the 3-level long descriptor format that has no PUD and always has a PMD. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
2014-05-26iommu/ipmmu-vmsa: Set the PTE contiguous hint bit when possibleLaurent Pinchart1-3/+40
The contiguous hint bit signals to the IOMMU that a range of 16 PTEs refer to physically contiguous memory. It improves performances by dividing the number of TLB lookups by 16, effectively implementing 64kB page sizes. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
2014-05-26iommu/ipmmu-vmsa: Define driver-specific page directory sizesLaurent Pinchart1-5/+10
The PTRS_PER_(PUD|PGD|PMD|PTE) macros evaluate to different values depending on whether LPAE is enabled. The IPMMU driver uses a long descriptor format regardless of LPAE, making those macros mismatch the IPMMU configuration on non-LPAE systems. Replace the macros by driver-specific versions that always evaluate to the right value. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
2014-05-26iommu/ipmmu-vmsa: Fix the supported page sizesLaurent Pinchart1-1/+1
The hardware supports 2MB page sizes, not 1MB. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
2014-05-26iommu/ipmmu-vmsa: Refactor micro-TLB lookupLaurent Pinchart1-40/+52
Cache the micro-TLB number in archdata allocated in the .add_device handler instead of looking it up when the deviced is attached and detached. This simplifies the .attach_dev and .detach_dev operations and prepares for DT support. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
2014-05-26iommu: Add driver for Renesas VMSA-compatible IPMMULaurent Pinchart1-0/+1070
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>