aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/iommu-common.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/iommu-common.c b/lib/iommu-common.c
index 7583f9b7846b..fac4f35250c9 100644
--- a/lib/iommu-common.c
+++ b/lib/iommu-common.c
@@ -10,6 +10,10 @@
10#include <linux/iommu-common.h> 10#include <linux/iommu-common.h>
11#include <linux/dma-mapping.h> 11#include <linux/dma-mapping.h>
12 12
13#ifndef DMA_ERROR_CODE
14#define DMA_ERROR_CODE (~(dma_addr_t)0x0)
15#endif
16
13#define IOMMU_LARGE_ALLOC 15 17#define IOMMU_LARGE_ALLOC 15
14 18
15/* 19/*
@@ -121,7 +125,7 @@ unsigned long iommu_tbl_range_alloc(struct device *dev,
121 boundary_size = ALIGN(dma_get_seg_boundary(dev) + 1, 125 boundary_size = ALIGN(dma_get_seg_boundary(dev) + 1,
122 1 << iommu->page_table_shift); 126 1 << iommu->page_table_shift);
123 else 127 else
124 boundary_size = ALIGN(1UL << 32, 1 << iommu->page_table_shift); 128 boundary_size = ALIGN(1ULL << 32, 1 << iommu->page_table_shift);
125 129
126 shift = iommu->page_table_map_base >> iommu->page_table_shift; 130 shift = iommu->page_table_map_base >> iommu->page_table_shift;
127 boundary_size = boundary_size >> iommu->page_table_shift; 131 boundary_size = boundary_size >> iommu->page_table_shift;