summaryrefslogtreecommitdiff
path: root/drivers/iommu/ipmmu-vmsa.c
AgeCommit message (Collapse)Author
2014-07-07iommu: Constify struct iommu_opsThierry Reding
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 Roedel
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 Pinchart
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 Pinchart
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 Pinchart
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 Pinchart
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 Pinchart
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 Pinchart
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 Pinchart
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 Pinchart
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 Pinchart
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 Pinchart
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>