Skip to content

Commit

Permalink
iommu/core: Use PAGE_SIZE instead of hard-coded value
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joerg Roedel committed Sep 6, 2011
1 parent 4099818 commit 8541034
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/iommu/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand All @@ -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));

Expand Down

0 comments on commit 8541034

Please sign in to comment.