Revert "xen/swiotlb: add alignment check for dma buffers"
This reverts commit 53d2af3cf5
.
This commit is contained in:
parent
dc8e64e562
commit
846de9e641
1 changed files with 0 additions and 6 deletions
|
@ -91,15 +91,9 @@ static inline int range_straddles_page_boundary(phys_addr_t p, size_t size)
|
|||
{
|
||||
unsigned long next_bfn, xen_pfn = XEN_PFN_DOWN(p);
|
||||
unsigned int i, nr_pages = XEN_PFN_UP(xen_offset_in_page(p) + size);
|
||||
phys_addr_t algn = 1ULL << (get_order(size) + PAGE_SHIFT);
|
||||
|
||||
next_bfn = pfn_to_bfn(xen_pfn);
|
||||
|
||||
/* If buffer is physically aligned, ensure DMA alignment. */
|
||||
if (IS_ALIGNED(p, algn) &&
|
||||
!IS_ALIGNED((phys_addr_t)next_bfn << XEN_PAGE_SHIFT, algn))
|
||||
return 1;
|
||||
|
||||
for (i = 1; i < nr_pages; i++)
|
||||
if (pfn_to_bfn(++xen_pfn) != ++next_bfn)
|
||||
return 1;
|
||||
|
|
Loading…
Reference in a new issue