diff options
Diffstat (limited to 'drivers/xen/swiotlb-xen.c')
-rw-r--r-- | drivers/xen/swiotlb-xen.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index bb7888429be6..877baf2a94f4 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c | |||
@@ -214,10 +214,13 @@ retry: | |||
214 | /* | 214 | /* |
215 | * Get IO TLB memory from any location. | 215 | * Get IO TLB memory from any location. |
216 | */ | 216 | */ |
217 | if (early) | 217 | if (early) { |
218 | xen_io_tlb_start = memblock_alloc(PAGE_ALIGN(bytes), | 218 | xen_io_tlb_start = memblock_alloc(PAGE_ALIGN(bytes), |
219 | PAGE_SIZE); | 219 | PAGE_SIZE); |
220 | else { | 220 | if (!xen_io_tlb_start) |
221 | panic("%s: Failed to allocate %lu bytes align=0x%lx\n", | ||
222 | __func__, PAGE_ALIGN(bytes), PAGE_SIZE); | ||
223 | } else { | ||
221 | #define SLABS_PER_PAGE (1 << (PAGE_SHIFT - IO_TLB_SHIFT)) | 224 | #define SLABS_PER_PAGE (1 << (PAGE_SHIFT - IO_TLB_SHIFT)) |
222 | #define IO_TLB_MIN_SLABS ((1<<20) >> IO_TLB_SHIFT) | 225 | #define IO_TLB_MIN_SLABS ((1<<20) >> IO_TLB_SHIFT) |
223 | while ((SLABS_PER_PAGE << order) > IO_TLB_MIN_SLABS) { | 226 | while ((SLABS_PER_PAGE << order) > IO_TLB_MIN_SLABS) { |