From 85410340e0d0224c78c7d40a3ac7e1b3e9670cf1 Mon Sep 17 00:00:00 2001 From: Joerg Roedel Date: Tue, 6 Sep 2011 14:36:17 +0200 Subject: iommu/core: Use PAGE_SIZE instead of hard-coded value Replace the hard-coded 4kb by PAGE_SIZE to make iommu-api implementations possible on architectures where PAGE_SIZE != 4kb. Signed-off-by: Joerg Roedel --- drivers/iommu/iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/iommu') diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index e61a9bad6df3..30b064497486 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -100,7 +100,7 @@ int iommu_map(struct iommu_domain *domain, unsigned long iova, { size_t size; - size = 0x1000UL << gfp_order; + size = PAGE_SIZE << gfp_order; BUG_ON(!IS_ALIGNED(iova | paddr, size)); @@ -112,7 +112,7 @@ int iommu_unmap(struct iommu_domain *domain, unsigned long iova, int gfp_order) { size_t size; - size = 0x1000UL << gfp_order; + size = PAGE_SIZE << gfp_order; BUG_ON(!IS_ALIGNED(iova, size)); -- cgit v1.2.1