"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "drivers/xen/swiotlb-xen.c" between
linux-3.16.62.tar.xz and linux-3.16.63.tar.xz

About: The full source of the Linux kernel 3.16.x (longterm stable)

swiotlb-xen.c  (linux-3.16.62.tar.xz):swiotlb-xen.c  (linux-3.16.63.tar.xz)
skipping to change at line 314 skipping to change at line 314
dma_addr_t dev_addr; dma_addr_t dev_addr;
/* /*
* Ignore region specifiers - the kernel's ideas of * Ignore region specifiers - the kernel's ideas of
* pseudo-phys memory layout has nothing to do with the * pseudo-phys memory layout has nothing to do with the
* machine physical layout. We can't allocate highmem * machine physical layout. We can't allocate highmem
* because we can't return a pointer to it. * because we can't return a pointer to it.
*/ */
flags &= ~(__GFP_DMA | __GFP_HIGHMEM); flags &= ~(__GFP_DMA | __GFP_HIGHMEM);
/* Convert the size to actually allocated. */
size = 1UL << (order + PAGE_SHIFT);
if (dma_alloc_from_coherent(hwdev, size, dma_handle, &ret)) if (dma_alloc_from_coherent(hwdev, size, dma_handle, &ret))
return ret; return ret;
/* On ARM this function returns an ioremap'ped virtual address for /* On ARM this function returns an ioremap'ped virtual address for
* which virt_to_phys doesn't return the corresponding physical * which virt_to_phys doesn't return the corresponding physical
* address. In fact on ARM virt_to_phys only works for kernel direct * address. In fact on ARM virt_to_phys only works for kernel direct
* mapped RAM memory. Also see comment below. * mapped RAM memory. Also see comment below.
*/ */
ret = xen_alloc_coherent_pages(hwdev, size, dma_handle, flags, attrs); ret = xen_alloc_coherent_pages(hwdev, size, dma_handle, flags, attrs);
skipping to change at line 369 skipping to change at line 372
if (dma_release_from_coherent(hwdev, order, vaddr)) if (dma_release_from_coherent(hwdev, order, vaddr))
return; return;
if (hwdev && hwdev->coherent_dma_mask) if (hwdev && hwdev->coherent_dma_mask)
dma_mask = hwdev->coherent_dma_mask; dma_mask = hwdev->coherent_dma_mask;
/* do not use virt_to_phys because on ARM it doesn't return you the /* do not use virt_to_phys because on ARM it doesn't return you the
* physical address */ * physical address */
phys = xen_bus_to_phys(dev_addr); phys = xen_bus_to_phys(dev_addr);
/* Convert the size to actually allocated. */
size = 1UL << (order + PAGE_SHIFT);
if (((dev_addr + size - 1 <= dma_mask)) || if (((dev_addr + size - 1 <= dma_mask)) ||
range_straddles_page_boundary(phys, size)) range_straddles_page_boundary(phys, size))
xen_destroy_contiguous_region(phys, order); xen_destroy_contiguous_region(phys, order);
xen_free_coherent_pages(hwdev, size, vaddr, (dma_addr_t)phys, attrs); xen_free_coherent_pages(hwdev, size, vaddr, (dma_addr_t)phys, attrs);
} }
EXPORT_SYMBOL_GPL(xen_swiotlb_free_coherent); EXPORT_SYMBOL_GPL(xen_swiotlb_free_coherent);
/* /*
* Map a single buffer of the indicated size for DMA in streaming mode. The * Map a single buffer of the indicated size for DMA in streaming mode. The
 End of changes. 2 change blocks. 
0 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)