Re: [PATCH] dma: add new dma_mapping_ops API sync_page

2008-10-10 Thread Remi Machet
On Fri, 2008-10-10 at 14:46 +1100, Benjamin Herrenschmidt wrote: A virtual address will typically be needed to perform the flush; why pass the bus address? Because it is a sync API. You want to make sure that a physical memory area is in sync with the caches, not the virtual address.

Re: [PATCH] dma: add new dma_mapping_ops API sync_page

2008-10-09 Thread Benjamin Herrenschmidt
A virtual address will typically be needed to perform the flush; why pass the bus address? Because it is a sync API. You want to make sure that a physical memory area is in sync with the caches, not the virtual address. This distinction can become important in the event where the page is

Re: [PATCH] dma: add new dma_mapping_ops API sync_page

2008-10-06 Thread Scott Wood
Remi Machet wrote: After continuing to work on the dma noncoherent code I realized that sync_page is not the best choice of API: -The API should preferably take a dma_addr_t in my opinion A virtual address will typically be needed to perform the flush; why pass the bus address? -Scott

Re: [PATCH] dma: add new dma_mapping_ops API sync_page

2008-10-06 Thread Remi Machet
On Mon, 2008-10-06 at 11:30 -0500, Scott Wood wrote: Remi Machet wrote: After continuing to work on the dma noncoherent code I realized that sync_page is not the best choice of API: -The API should preferably take a dma_addr_t in my opinion A virtual address will typically be needed to

Re: [PATCH] dma: add new dma_mapping_ops API sync_page

2008-10-03 Thread Remi Machet
On Wed, 2008-10-01 at 15:03 -0700, Remi Machet wrote: This patch replaces the global APIs __dma_sync and __dma_sync_page with a new dma_mapping_ops API named sync_page. This is necessary to make sure that the proper synchronization mechanism is used for a device DMA depending on the bus the

[PATCH] dma: add new dma_mapping_ops API sync_page

2008-10-01 Thread Remi Machet
This patch replaces the global APIs __dma_sync and __dma_sync_page with a new dma_mapping_ops API named sync_page. This is necessary to make sure that the proper synchronization mechanism is used for a device DMA depending on the bus the device is on. Signed-off-by: Remi Machet [EMAIL PROTECTED]