On Thu, 2009-05-21 at 17:54 +0900, FUJITA Tomonori wrote:
> @@ -819,8 +796,8 @@ swiotlb_map_sg_attrs(struct device *hwdev, struct
> scatterlist *sgl, int nelems,
> phys_addr_t paddr = sg_phys(sg);
> dma_addr_t dev_addr = swiotlb_phys_to_bus(hwdev, paddr);
>
> - if (range_needs_mapping(paddr, sg->length) ||
> - address_needs_mapping(hwdev, dev_addr, sg->length)) {
> + if (!is_buffer_dma_capable(hwdev, dma_get_mask(hwdev), paddr,
> sg->length) ||
> + swiotlb_force) {
> void *map = map_single(hwdev, sg_phys(sg),
> sg->length, dir);
> if (!map) {
BTW I think there was a typo here, dev_addr becomes paddr. I fixed that
in my updated version.
Ian.
--
Ian Campbell
Current Noise: Isis - In Fiction
Poorochrondria:
Hypochrondria derived from not having medical insurance.
-- Douglas Coupland, "Generation X: Tales for an Accelerated
Culture"
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|