Messages in this thread | | | Date | Sun, 5 Dec 2004 12:52:51 -0800 | From | Eugene Surovegin <> | Subject | Re: [PATCH][PPC32[NEWBIE] enhancement to virt_to_bus/bus_to_virt (try 2) |
| |
On Sun, Dec 05, 2004 at 02:18:45PM -0500, Linh Dang wrote: > From a single virtual buffer, the DMA library will build a chained list of > physically contiguous buffers (it can be one or more physical buffers). > All the DMA engines I'm familiar with (mpc8260, mpc8580, marvell, etc.) > accept a list of physical buffers. > > The decoding algorithm (from a single virtual buffer to a chained list of > physical buffers) is dead simple.
So you gonna call virt_to_bus several times (for each page) and see whether you get new phys page or not? This could work, but for the common case of phys-continuous buffer it'll be suboptimal, i.e. you waste time calling virt_to_bus when it's not needed. TO make it better you have to move that range check from virt_to_bus and friends to your DMA library, in this case we end up in the same situation we are already :) - no need to modify virt_to_bus....
-- Eugene - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |