diff options
Diffstat (limited to 'lib/swiotlb.c')
-rw-r--r-- | lib/swiotlb.c | 6 |
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, | |||
483 | : 1UL << (BITS_PER_LONG - IO_TLB_SHIFT); | 483 | : 1UL << (BITS_PER_LONG - IO_TLB_SHIFT); |
484 | 484 | ||
485 | /* | 485 | /* |
486 | * For mappings greater than a page, we limit the stride (and | 486 | * For mappings greater than or equal to a page, we limit the stride |
487 | * hence alignment) to a page size. | 487 | * (and hence alignment) to a page size. |
488 | */ | 488 | */ |
489 | nslots = ALIGN(size, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT; | 489 | nslots = ALIGN(size, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT; |
490 | if (size > PAGE_SIZE) | 490 | if (size >= PAGE_SIZE) |
491 | stride = (1 << (PAGE_SHIFT - IO_TLB_SHIFT)); | 491 | stride = (1 << (PAGE_SHIFT - IO_TLB_SHIFT)); |
492 | else | 492 | else |
493 | stride = 1; | 493 | stride = 1; |