From: "Scott Parish" Subject: [patch] dma mask should be against ma not pa Date: Fri, 3 Jun 2005 06:44:18 +0000 Message-ID: <20050603064418.GK9951@us.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="GUPx2O/K0ibUojHx" Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --GUPx2O/K0ibUojHx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline IO DMA isn't bound by physical address, but it is by machine address. sRp -- Scott Parish Signed-off-by: srparish@us.ibm.com --GUPx2O/K0ibUojHx Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="check-ma-not-pa.diff" 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 --- old-xen-64-4/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/dma-mapping.h 2005-05-24 17:34:54.000000000 +0000 +++ new-xen-64-4/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/dma-mapping.h 2005-06-03 06:40:04.000000000 +0000 @@ -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; } --GUPx2O/K0ibUojHx Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --GUPx2O/K0ibUojHx--