summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2017-07-12 03:29:33 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-07-12 03:29:33 -0700
commit7438a89b3c3590ae2a4f57035d5aae8a65b75e93 (patch)
treea8748a983a6a40b316fce007374ce2879d527d86 /lib
parentd03efe4d51a0f3911b685d377998a817c323ff01 (diff)
parent4c8daae4af3f2a10d60daecf91604e2ace98dda1 (diff)
Merge "Merge android-4.4@64a73ff (v4.4.76) into msm-4.4"
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 76f29ecba8f4..771234d050c7 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -452,11 +452,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;