summaryrefslogtreecommitdiff
path: root/drivers/iommu/iommu.c
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2011-09-06 14:36:17 +0200
committerHiroshi DOYU <hdoyu@nvidia.com>2012-01-23 11:11:32 +0200
commit89f0314d29fa179f4bbaa2c7404cebb99646198e (patch)
treef8c7e085a5cb804527f72ed5227c0cef34740ef4 /drivers/iommu/iommu.c
parent9bedc101168cb42071107d55e75cf4a12275b339 (diff)
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 <joerg.roedel@amd.com>
Diffstat (limited to 'drivers/iommu/iommu.c')
-rw-r--r--drivers/iommu/iommu.c4
1 files changed, 2 insertions, 2 deletions
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));