diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2011-09-06 08:36:17 -0400 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2011-09-06 08:36:17 -0400 |
commit | 85410340e0d0224c78c7d40a3ac7e1b3e9670cf1 (patch) | |
tree | 7893219f4af968ae38ca443f44b478cafd0bb519 | |
parent | 4099818842abd98ef2b18a8ac7a2e2ad3bc3d7c2 (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>
-rw-r--r-- | drivers/iommu/iommu.c | 4 |
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, | |||
100 | { | 100 | { |
101 | size_t size; | 101 | size_t size; |
102 | 102 | ||
103 | size = 0x1000UL << gfp_order; | 103 | size = PAGE_SIZE << gfp_order; |
104 | 104 | ||
105 | BUG_ON(!IS_ALIGNED(iova | paddr, size)); | 105 | BUG_ON(!IS_ALIGNED(iova | paddr, size)); |
106 | 106 | ||
@@ -112,7 +112,7 @@ int iommu_unmap(struct iommu_domain *domain, unsigned long iova, int gfp_order) | |||
112 | { | 112 | { |
113 | size_t size; | 113 | size_t size; |
114 | 114 | ||
115 | size = 0x1000UL << gfp_order; | 115 | size = PAGE_SIZE << gfp_order; |
116 | 116 | ||
117 | BUG_ON(!IS_ALIGNED(iova, size)); | 117 | BUG_ON(!IS_ALIGNED(iova, size)); |
118 | 118 | ||