View | Details | Raw Unified | Return to bug 553690
Collapse All | Expand All

(-)11.2-2009-11-12.orig/lib/swiotlb-xen.c (+13 lines)
Lines 450-455 do_unmap_single(struct device *hwdev, ch Link Here
450
	int index = (dma_addr - io_tlb_start) >> IO_TLB_SHIFT;
450
	int index = (dma_addr - io_tlb_start) >> IO_TLB_SHIFT;
451
	phys_addr_t phys = io_tlb_orig_addr[index];
451
	phys_addr_t phys = io_tlb_orig_addr[index];
452
452
453
for(i = 1; i < nslots; ++i) {//temp
454
 BUG_ON((phys ^ io_tlb_orig_addr[index + i]) & ((1 << IO_TLB_SHIFT) - 1));
455
}
453
	/*
456
	/*
454
	 * First, sync the memory before unmapping the entry
457
	 * First, sync the memory before unmapping the entry
455
	 */
458
	 */
Lines 676-681 swiotlb_map_sg_attrs(struct device *hwde Link Here
676
		phys_addr_t paddr = page_to_pseudophys(sg_page(sg))
679
		phys_addr_t paddr = page_to_pseudophys(sg_page(sg))
677
				   + sg->offset;
680
				   + sg->offset;
678
681
682
if(dir != DMA_TO_DEVICE && sg->offset + sg->length > PAGE_SIZE) {//temp
683
 u8*p = page_address(sg_page(sg));
684
 long offs = sg->offset + sg->length - 1;
685
 WARN((sg->offset | sg->length) & 0x1ff,
686
      "sg%d@%p[%d/%d] v=%p+%x:%x\n", dir, sgl, i, nelems, p, sg->offset, sg->length);
687
 do {
688
  __asm__ __volatile__("lock orb $0, %0" : : "m" (p[offs]));
689
  offs -= PAGE_SIZE;
690
 } while(offs >= (long)sg->offset);
691
}
679
		if (range_needs_mapping(paddr, sg->length)
692
		if (range_needs_mapping(paddr, sg->length)
680
		    || address_needs_mapping(hwdev, dev_addr, sg->length)) {
693
		    || address_needs_mapping(hwdev, dev_addr, sg->length)) {
681
			void *map;
694
			void *map;

Return to bug 553690