Re: Where do we stand with the Xen patches?

From: Ian Campbell
Date: Thu May 21 2009 - 06:49:12 EST


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"

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/