Skip to contentSkip to conversation

dma mask should be against ma not pa

PATCH New Scott Parish 1 participant 1 message Jun 3, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dma mask should be against ma not pa

IO DMA isn't bound by physical address, but it is by machine address.

sRp

Signature · 2 lines
Scott Parish
Signed-off-by: [email protected]
linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/dma-mapping.h +2 -2
diff -rN -u -p old-xen-64-4/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/dma-mapping.h new-xen-64-4/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/dma-mapping.h
@@ -39,11 +39,11 @@ static inline dma_addr_t dma_map_single(
 
 	if (direction == DMA_NONE)
 		out_of_line_bug();
-	addr = virt_to_phys(ptr);
+	addr = virt_to_machine(ptr);
 
 	if ((addr+size) & ~*hwdev->dma_mask)
 		out_of_line_bug();
-	return phys_to_machine(addr);
+	return addr;
 }
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel