diff options
author | Christoph Hellwig <hch@lst.de> | 2018-04-03 09:41:07 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-05-09 00:55:44 -0400 |
commit | 79c1879ee5473e3404469b07f9bccfe6d0814b93 (patch) | |
tree | 7dfd4e224cd8bf1e4790ba8505fd25569f019155 /lib/iommu-helper.c | |
parent | 33782714dc53cfb9b8b02e852f3d239e5820cf42 (diff) |
iommu-helper: mark iommu_is_span_boundary as inline
This avoids selecting IOMMU_HELPER just for this function. And we only
use it once or twice in normal builds so this often even is a size
reduction.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'lib/iommu-helper.c')
-rw-r--r-- | lib/iommu-helper.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/iommu-helper.c b/lib/iommu-helper.c index ded1703e7e64..92a9f243c0e2 100644 --- a/lib/iommu-helper.c +++ b/lib/iommu-helper.c | |||
@@ -4,17 +4,7 @@ | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/bitmap.h> | 6 | #include <linux/bitmap.h> |
7 | #include <linux/bug.h> | 7 | #include <linux/iommu-helper.h> |
8 | |||
9 | int iommu_is_span_boundary(unsigned int index, unsigned int nr, | ||
10 | unsigned long shift, | ||
11 | unsigned long boundary_size) | ||
12 | { | ||
13 | BUG_ON(!is_power_of_2(boundary_size)); | ||
14 | |||
15 | shift = (shift + index) & (boundary_size - 1); | ||
16 | return shift + nr > boundary_size; | ||
17 | } | ||
18 | 8 | ||
19 | unsigned long iommu_area_alloc(unsigned long *map, unsigned long size, | 9 | unsigned long iommu_area_alloc(unsigned long *map, unsigned long size, |
20 | unsigned long start, unsigned int nr, | 10 | unsigned long start, unsigned int nr, |