diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2019-05-03 16:20:04 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2019-05-03 16:20:58 +0300 |
commit | d00afd5ede1c29a6dc59be2d7fb7d6ef28eb85c5 (patch) | |
tree | e194b1968e54380a6654abf7d3a037ca0a010280 /drivers/iommu/iova.c | |
parent | 9a51b86a61214a297cdfc1bb705b7267f9455ae6 (diff) | |
parent | d5984d2a312144bedccf32aea2298f8df05bb617 (diff) | |
download | linux-d00afd5ede1c29a6dc59be2d7fb7d6ef28eb85c5.tar.xz |
Merge branch 'i2c-mux/for-next' of https://github.com/peda-r/i2c-mux into i2c/for-5.2
Mainly some pca954x work, i.e. removal of unused platform data support
and added support for sysfs interface for manipulating/examining the
idle state. And then a mechanical cocci-style patch.
Diffstat (limited to 'drivers/iommu/iova.c')
-rw-r--r-- | drivers/iommu/iova.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/iommu/iova.c b/drivers/iommu/iova.c index f8d3ba247523..2de8122e218f 100644 --- a/drivers/iommu/iova.c +++ b/drivers/iommu/iova.c @@ -207,8 +207,10 @@ static int __alloc_and_insert_iova_range(struct iova_domain *iovad, curr_iova = rb_entry(curr, struct iova, node); } while (curr && new_pfn <= curr_iova->pfn_hi); - if (limit_pfn < size || new_pfn < iovad->start_pfn) + if (limit_pfn < size || new_pfn < iovad->start_pfn) { + iovad->max32_alloc_size = size; goto iova32_full; + } /* pfn_lo will point to size aligned address if size_aligned is set */ new->pfn_lo = new_pfn; @@ -222,7 +224,6 @@ static int __alloc_and_insert_iova_range(struct iova_domain *iovad, return 0; iova32_full: - iovad->max32_alloc_size = size; spin_unlock_irqrestore(&iovad->iova_rbtree_lock, flags); return -ENOMEM; } |