Commit 85410340 authored by Joerg Roedel's avatar Joerg Roedel

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: default avatarJoerg Roedel <joerg.roedel@amd.com>
parent 40998188
...@@ -100,7 +100,7 @@ int iommu_map(struct iommu_domain *domain, unsigned long iova, ...@@ -100,7 +100,7 @@ int iommu_map(struct iommu_domain *domain, unsigned long iova,
{ {
size_t size; size_t size;
size = 0x1000UL << gfp_order; size = PAGE_SIZE << gfp_order;
BUG_ON(!IS_ALIGNED(iova | paddr, size)); BUG_ON(!IS_ALIGNED(iova | paddr, size));
...@@ -112,7 +112,7 @@ int iommu_unmap(struct iommu_domain *domain, unsigned long iova, int gfp_order) ...@@ -112,7 +112,7 @@ int iommu_unmap(struct iommu_domain *domain, unsigned long iova, int gfp_order)
{ {
size_t size; size_t size;
size = 0x1000UL << gfp_order; size = PAGE_SIZE << gfp_order;
BUG_ON(!IS_ALIGNED(iova, size)); BUG_ON(!IS_ALIGNED(iova, size));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment