diff options
author | Emil Medve <Emilian.Medve@Freescale.com> | 2013-04-09 15:32:28 (GMT) |
---|---|---|
committer | Fleming Andrew-AFLEMING <AFLEMING@freescale.com> | 2013-04-10 20:50:47 (GMT) |
commit | 532cd8b1fba8b5c0a6098507c515d0907c6f8226 (patch) | |
tree | 81e1b56f5bd99311a2a1dc74fee5150681624bd9 /drivers | |
parent | 9df46519beece0c26e26685f73f77ac80e0cf7db (diff) | |
download | linux-fsl-qoriq-532cd8b1fba8b5c0a6098507c515d0907c6f8226.tar.xz |
squash! iommu/fsl: PAMU driver fixes.
7. Aperture size calculation was off by one byte
Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
Change-Id: I10c7d34f5a8c541b8b3d6290629e1d87ea8a2ea0
Reviewed-on: http://git.am.freescale.net:8181/1170
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/iommu/fsl_pamu_domain.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iommu/fsl_pamu_domain.c b/drivers/iommu/fsl_pamu_domain.c index d1e0e6d..68610b6 100644 --- a/drivers/iommu/fsl_pamu_domain.c +++ b/drivers/iommu/fsl_pamu_domain.c @@ -449,7 +449,7 @@ static int fsl_pamu_domain_init(struct iommu_domain *domain) dma_domain->iommu_domain = domain; /* defaul geometry 64 GB i.e. maximum system address */ domain->geometry.aperture_start = 0; - domain->geometry.aperture_end = 1ULL << 36; + domain->geometry.aperture_end = (1ULL << 36) - 1; domain->geometry.force_aperture = true; return 0; @@ -761,7 +761,7 @@ static int configure_domain_geometry(struct iommu_domain *domain, void *data) dma_addr_t geom_size; unsigned long flags; - geom_size = geom_attr->aperture_end - geom_attr->aperture_start; + geom_size = geom_attr->aperture_end - geom_attr->aperture_start + 1; /* * Sanity check the geometry size. Also, we do not support * DMA outside of the geometry. |