X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=drivers%2Fxen%2Fswiotlb-xen.c;h=284798aaf8b1391fd8d4de7e43bff52e5721272d;hb=d756bd2d9339447c29bde950910586df8f8941ec;hp=8e964b91c447b117b7d4d17731201254a79365d5;hpb=45ff6fa1adf81f72e4815f0a993a644467b7b185;p=~andy%2Flinux diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index 8e964b91c44..284798aaf8b 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c @@ -166,7 +166,7 @@ retry: /* * Get IO TLB memory from any location. */ - xen_io_tlb_start = alloc_bootmem(bytes); + xen_io_tlb_start = alloc_bootmem_pages(PAGE_ALIGN(bytes)); if (!xen_io_tlb_start) { m = "Cannot allocate Xen-SWIOTLB buffer!\n"; goto error; @@ -179,7 +179,7 @@ retry: bytes, xen_io_tlb_nslabs); if (rc) { - free_bootmem(__pa(xen_io_tlb_start), bytes); + free_bootmem(__pa(xen_io_tlb_start), PAGE_ALIGN(bytes)); m = "Failed to get contiguous memory for DMA from Xen!\n"\ "You either: don't have the permissions, do not have"\ " enough free memory under 4GB, or the hypervisor memory"\