From 82d0f808a6ab0b8ce3837945f53d9ef042b5dacd Mon Sep 17 00:00:00 2001 From: Hiroshi DOYU Date: Fri, 20 Jan 2012 07:56:07 +0200 Subject: [PATCH 1/2] iommu/tegra/gart: Implement DOMAIN_ATTR_GEOMETRY attribute Implement the attribute for the Tegra GART driver. Signed-off-by: Hiroshi DOYU --- drivers/iommu/tegra-gart.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/iommu/tegra-gart.c b/drivers/iommu/tegra-gart.c index feaccd4..e237b08 100644 --- a/drivers/iommu/tegra-gart.c +++ b/drivers/iommu/tegra-gart.c @@ -181,6 +181,12 @@ static int gart_iommu_attach_dev(struct iommu_domain *domain, if (!gart) return -EINVAL; domain->priv = gart; + + domain->geometry.aperture_start = gart->iovmm_base; + domain->geometry.aperture_end = gart->iovmm_base + + gart->page_count * GART_PAGE_SIZE - 1; + domain->geometry.force_aperture = true; + client = devm_kzalloc(dev, sizeof(*c), GFP_KERNEL); if (!client) return -ENOMEM; -- 1.7.5.4