Problems with dma_alloc_coherent()

Eugene Surovegin ebs at ebshome.net
Fri Apr 2 04:59:56 EST 2004


On Thu, Apr 01, 2004 at 01:55:10PM -0500, Dan Malek wrote:
> >Current implementation just relies on the fact that PCI devices view system
> >memory the same way as other-bus devices (e.g. OCP devices which sit on
> >OPB).
>
> I don't think so.  PCI devices are known to go through bridges, while
> others are assumed to not.

Well, bridge doesn't necessarily mean there is an address translation :).
Currently 4xx systems (not sure all, at least ones I use) use PCI == phys
address mapping, and yes, bridge is setup so this is the case.

Although, I understand in more general case, bridge will translate address.

> >In more general case, yes, "views" can be different for each bus type or
> >even
> >for each bus...
>
> So, we should always have some kind of 'bus type' device handle, that
> provides
> this information.  It's clear that all Linux APIs are designed from the
> viewpoint of PC-like workstations.  They have always fallen very short when
> pressed into the more prevalent embedded computing space :-)

I think we should use "device" parameter passed to DMA API for such stuff, it
already has a member "struct bus_type* bus".

Eugene

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-dev mailing list