From: Keir Fraser Subject: Re: [ivtv-devel] Problems loading ivtv in Xen - DMA issues? Date: Wed, 13 Jul 2005 23:06:54 +0100 Message-ID: References: <1120750950.1556.24.camel@mud> <5c8bdef6ff868881d1a1e3bc0a79a906@cl.cam.ac.uk> <16670726ccb66463d6804f0dc87e3690@cl.cam.ac.uk> <38a9ac6264e50346c160833d732fc567@cl.cam.ac.uk> Mime-Version: 1.0 (Apple Message framework v622) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: David Muench Cc: xen-devel List List-Id: xen-devel@lists.xenproject.org On 13 Jul 2005, at 20:51, David Muench wrote: > Well, life got in the way and I didn't try this fix until just now.. > But it works! I'm going to get my mythtv setup moved into the domU so > I can test it completely, but it seems to work perfectly. > > Thank you very, very much. Is removing the conditionals a permanent > solution that can be commited, or is there anything else you'd like me > to test? I believe the code as checked in is strictly correct, but maybe we can relax things a little. What happens if you leave the direction tests in dma_map_single and dma_unmap_single, but remove them from dma_sync_single_for_cpu and dma_sync_single_for_device? If the above works, leave the direction tests in the new modified form; otherwise revert to the previous working state (ie. direction tests removed from all four functions). Either way, another thing that is interesting to try is the following: (1) At the start of dma_sync_single_for_cpu add: if (direction == DMA_TO_DEVICE) dma_sync_single_for_device(dev, dma_handle, size, direction); (2) At the start of dma_sync_single_for_device add: if (direction == DMA_FROM_DEVICE) dma_sync_single_for_cpu(dev, dma_handle, size, direction); This will make the sync functions behave as they do in the ARM architecture, which also uses bounce buffers but has at least been looked over by the core kernel DMA guys. -- Keir