summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2017-01-18 15:22:40 -0700
committerJens Axboe <axboe@fb.com>2017-01-18 15:22:40 -0700
commit8c87d4ee514bebc39f145f6ef344412594da15c0 (patch)
treee2c788b8f5259cf3b6bc98a643a37050b997984d /lib
parente630eb4513effb7816e6a925d27254dfee18c554 (diff)
parent88a7503376f4f3bf303c809d1a389739e1205614 (diff)
Merge branch 'for-linus' into for-next
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/swiotlb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 975b8fc4f1e1..a8d74a733a38 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -483,11 +483,11 @@ phys_addr_t swiotlb_tbl_map_single(struct device *hwdev,
: 1UL << (BITS_PER_LONG - IO_TLB_SHIFT);
/*
- * For mappings greater than a page, we limit the stride (and
- * hence alignment) to a page size.
+ * For mappings greater than or equal to a page, we limit the stride
+ * (and hence alignment) to a page size.
*/
nslots = ALIGN(size, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT;
- if (size > PAGE_SIZE)
+ if (size >= PAGE_SIZE)
stride = (1 << (PAGE_SHIFT - IO_TLB_SHIFT));
else
stride = 1;