Re: [PATCH][PPC32[NEWBIE] enhancement to virt_to_bus/bus_to_virt (try 2)

From: Linh Dang
Date: Sun Dec 05 2004 - 20:34:58 EST


On Mon, 6 Dec 2004 08:12:58 +1100, Paul Mackerras <paulus@xxxxxxxxx> wrote:
> Linh Dang writes:
>
> > I wrote a DMA engine (to used by other drivers) that (would like to) accept
> > all kind of buffers as input (vmalloced, dual-access shared RAM mapped
> > by BATs, etc). The DMA engine has to decode the virtual address of the
> > input buffer to (possibly multiple) physical address(es). virt_to_phys()
> > has the right name for the job except it only works for the kernel virtual
> > addresses initially mapped at KERNELBASE
>
> Have you read Documentation/DMA-API.txt? It explains the official
> kernel API for DMA, and drivers should use it in order to be portable
> to more than just one architecture.

Thanx for the pointer, I'll read that carefully

>
> If you want to create a competing DMA API, you'll have to show us at
> least one driver that really needs your new API.
>

I think I'll implement the official DMA API for my card (the card uses the
Marvell 64460 as bridge).

> Also, please don't change the existing virt_to_*/*_to_virt functions.
> Instead define your own functions (with different names) in the same
> source file as your other new code.

Thanx for the answers.

--
Linh Dang
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/