Skip to contentSkip to conversation

iommu/core: Use PAGE_SIZE instead of hard-coded value

PATCH New Joerg Roedel 1 participant 1 message Sep 6, 2011 IOMMU

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/iommu/iommu.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/iommu/iommu.c +2 -2
index e61a9ba..30b0644 100644
@@ -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));
 
Signature · 1 line
1.7.4.1