diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-06-14 17:58:34 -0400 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2014-07-04 06:39:18 -0400 |
commit | 0f198890105b346c975dc0380a98b5d05b5e8a7b (patch) | |
tree | 90eb6ca36628edabb2d87ccd8e940b493a075396 /drivers/iommu | |
parent | 4c834452aad01531db949414f94f817a86348d59 (diff) |
iommu/omap: Use PAGE_ALIGNED instead of IS_ALIGNED(PAGE_SIZE)
use mm.h definition
Cc: Joerg Roedel <joro@8bytes.org>
Cc: iommu@lists.linux-foundation.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/omap-iovmm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/iommu/omap-iovmm.c b/drivers/iommu/omap-iovmm.c index d14725984153..f583ba049168 100644 --- a/drivers/iommu/omap-iovmm.c +++ b/drivers/iommu/omap-iovmm.c | |||
@@ -131,7 +131,7 @@ static unsigned sgtable_nents(size_t bytes, u32 da, u32 pa) | |||
131 | { | 131 | { |
132 | unsigned nr_entries = 0, ent_sz; | 132 | unsigned nr_entries = 0, ent_sz; |
133 | 133 | ||
134 | if (!IS_ALIGNED(bytes, PAGE_SIZE)) { | 134 | if (!PAGE_ALIGNED(bytes)) { |
135 | pr_err("%s: wrong size %08x\n", __func__, bytes); | 135 | pr_err("%s: wrong size %08x\n", __func__, bytes); |
136 | return 0; | 136 | return 0; |
137 | } | 137 | } |
@@ -159,7 +159,7 @@ static struct sg_table *sgtable_alloc(const size_t bytes, u32 flags, | |||
159 | if (!bytes) | 159 | if (!bytes) |
160 | return ERR_PTR(-EINVAL); | 160 | return ERR_PTR(-EINVAL); |
161 | 161 | ||
162 | if (!IS_ALIGNED(bytes, PAGE_SIZE)) | 162 | if (!PAGE_ALIGNED(bytes)) |
163 | return ERR_PTR(-EINVAL); | 163 | return ERR_PTR(-EINVAL); |
164 | 164 | ||
165 | if (flags & IOVMF_LINEAR) { | 165 | if (flags & IOVMF_LINEAR) { |
@@ -514,7 +514,7 @@ static void unmap_iovm_area(struct iommu_domain *domain, struct omap_iommu *obj, | |||
514 | size_t unmapped; | 514 | size_t unmapped; |
515 | 515 | ||
516 | BUG_ON(!sgtable_ok(sgt)); | 516 | BUG_ON(!sgtable_ok(sgt)); |
517 | BUG_ON((!total) || !IS_ALIGNED(total, PAGE_SIZE)); | 517 | BUG_ON((!total) || !PAGE_ALIGNED(total)); |
518 | 518 | ||
519 | start = area->da_start; | 519 | start = area->da_start; |
520 | for_each_sg(sgt->sgl, sg, sgt->nents, i) { | 520 | for_each_sg(sgt->sgl, sg, sgt->nents, i) { |
@@ -529,7 +529,7 @@ static void unmap_iovm_area(struct iommu_domain *domain, struct omap_iommu *obj, | |||
529 | dev_dbg(obj->dev, "%s: unmap %08x(%x) %08x\n", | 529 | dev_dbg(obj->dev, "%s: unmap %08x(%x) %08x\n", |
530 | __func__, start, bytes, area->flags); | 530 | __func__, start, bytes, area->flags); |
531 | 531 | ||
532 | BUG_ON(!IS_ALIGNED(bytes, PAGE_SIZE)); | 532 | BUG_ON(!PAGE_ALIGNED(bytes)); |
533 | 533 | ||
534 | total -= bytes; | 534 | total -= bytes; |
535 | start += bytes; | 535 | start += bytes; |
@@ -545,7 +545,7 @@ static struct sg_table *unmap_vm_area(struct iommu_domain *domain, | |||
545 | struct sg_table *sgt = NULL; | 545 | struct sg_table *sgt = NULL; |
546 | struct iovm_struct *area; | 546 | struct iovm_struct *area; |
547 | 547 | ||
548 | if (!IS_ALIGNED(da, PAGE_SIZE)) { | 548 | if (!PAGE_ALIGNED(da)) { |
549 | dev_err(obj->dev, "%s: alignment err(%08x)\n", __func__, da); | 549 | dev_err(obj->dev, "%s: alignment err(%08x)\n", __func__, da); |
550 | return NULL; | 550 | return NULL; |
551 | } | 551 | } |