* [PATCH] iommu/core: Use PAGE_SIZE instead of hard-coded value
@ 2011-09-06 12:42 Joerg Roedel
0 siblings, 0 replies; only message in thread
From: Joerg Roedel @ 2011-09-06 12:42 UTC (permalink / raw)
To: iommu; +Cc: linux-kernel, Joerg Roedel
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>
---
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 e61a9ba..30b0644 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));
--
1.7.4.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-09-06 12:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-06 12:42 [PATCH] iommu/core: Use PAGE_SIZE instead of hard-coded value Joerg Roedel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®