[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1318850846-16066-5-git-send-email-ohad@wizery.com>
Date: Mon, 17 Oct 2011 13:27:23 +0200
From: Ohad Ben-Cohen <ohad@...ery.com>
To: <iommu@...ts.linux-foundation.org>
Cc: <linux-omap@...r.kernel.org>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Joerg Roedel <Joerg.Roedel@....com>,
David Woodhouse <dwmw2@...radead.org>,
<linux-arm-kernel@...ts.infradead.org>,
David Brown <davidb@...eaurora.org>,
Arnd Bergmann <arnd@...db.de>, <linux-kernel@...r.kernel.org>,
Hiroshi Doyu <hdoyu@...dia.com>,
Stepan Moskovchenko <stepanm@...eaurora.org>,
KyongHo Cho <pullip.cho@...sung.com>,
Ohad Ben-Cohen <ohad@...ery.com>
Subject: [PATCH v4 4/7] iommu/msm: announce supported page sizes
Let the IOMMU core know we support 4KiB, 64KiB, 1MiB and 16MiB page sizes.
This way the IOMMU core can split any arbitrary-sized physically
contiguous regions (that it needs to map) as needed.
Signed-off-by: Ohad Ben-Cohen <ohad@...ery.com>
Acked-by: David Brown <davidb@...eaurora.org>
Cc: Stepan Moskovchenko <stepanm@...eaurora.org>
---
drivers/iommu/msm_iommu.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/iommu/msm_iommu.c b/drivers/iommu/msm_iommu.c
index 13718d9..08a90b8 100644
--- a/drivers/iommu/msm_iommu.c
+++ b/drivers/iommu/msm_iommu.c
@@ -42,6 +42,9 @@ __asm__ __volatile__ ( \
#define RCP15_PRRR(reg) MRC(reg, p15, 0, c10, c2, 0)
#define RCP15_NMRR(reg) MRC(reg, p15, 0, c10, c2, 1)
+/* bitmap of the page sizes currently supported */
+#define MSM_IOMMU_PGSIZES (SZ_4K | SZ_64K | SZ_1M | SZ_16M)
+
static int msm_iommu_tex_class[4];
DEFINE_SPINLOCK(msm_iommu_lock);
@@ -679,7 +682,8 @@ static struct iommu_ops msm_iommu_ops = {
.map = msm_iommu_map,
.unmap = msm_iommu_unmap,
.iova_to_phys = msm_iommu_iova_to_phys,
- .domain_has_cap = msm_iommu_domain_has_cap
+ .domain_has_cap = msm_iommu_domain_has_cap,
+ .pgsize_bitmap = MSM_IOMMU_PGSIZES,
};
static int __init get_tex_class(int icp, int ocp, int mt, int nos)
--
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists