diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/iommu-common.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/iommu-common.c b/lib/iommu-common.c index b99f1d744a8d..a1a517cba7ec 100644 --- a/lib/iommu-common.c +++ b/lib/iommu-common.c | |||
@@ -11,6 +11,10 @@ | |||
11 | #include <linux/dma-mapping.h> | 11 | #include <linux/dma-mapping.h> |
12 | #include <linux/hash.h> | 12 | #include <linux/hash.h> |
13 | 13 | ||
14 | #ifndef DMA_ERROR_CODE | ||
15 | #define DMA_ERROR_CODE (~(dma_addr_t)0x0) | ||
16 | #endif | ||
17 | |||
14 | unsigned long iommu_large_alloc = 15; | 18 | unsigned long iommu_large_alloc = 15; |
15 | 19 | ||
16 | static DEFINE_PER_CPU(unsigned int, iommu_pool_hash); | 20 | static DEFINE_PER_CPU(unsigned int, iommu_pool_hash); |
@@ -171,7 +175,7 @@ unsigned long iommu_tbl_range_alloc(struct device *dev, | |||
171 | boundary_size = ALIGN(dma_get_seg_boundary(dev) + 1, | 175 | boundary_size = ALIGN(dma_get_seg_boundary(dev) + 1, |
172 | 1 << iommu->table_shift); | 176 | 1 << iommu->table_shift); |
173 | else | 177 | else |
174 | boundary_size = ALIGN(1UL << 32, 1 << iommu->table_shift); | 178 | boundary_size = ALIGN(1ULL << 32, 1 << iommu->table_shift); |
175 | 179 | ||
176 | boundary_size = boundary_size >> iommu->table_shift; | 180 | boundary_size = boundary_size >> iommu->table_shift; |
177 | /* | 181 | /* |