Thread (30 messages) 30 messages, 7 authors, 2009-05-28

Re: [PATCH V2 2/3] powerpc: Add support for swiotlb on 32-bit

From: Leon Woestenberg <hidden>
Date: 2009-05-23 22:59:34
Also in: lkml

Hello,

On Sat, May 23, 2009 at 1:55 AM, Jeremy Fitzhardinge [off-list ref] wrot=
e:
Ian Campbell wrote:
quoted
On Thu, 2009-05-21 at 14:27 -0400, Becky Bruce wrote:
quoted
I can work with that, but it's going to be a bit inefficient, as I
=A0actually need the dma_addr_t, not the phys_addr_t, so I'll have to
=A0convert. =A0In every case, this is a conversion I've already done an=
d =A0that I
quoted
quoted
need in the calling code as well.
Does

=A0 =A0dma_addr_t dma_map_range(struct device *hwdev, phys_addr_t addr,
=A0 =A0size_t size);

work for you?

If the range does not need mapping then it returns the dma address, if
you needed to calculate the dma address anyway to figure out if mapping
is required then this is fine. If the range does need mapping then it
returns NULL.
My only concern is whether dma_addr_t =3D=3D 0 is actually equivalent to =
NULL.
=A0That is, can we be sure that address 0 will never be used?
Indeed, I remember seeing 0 returned on pci_alloc_coherent() as an
address (cookie).

Regards,
--=20
Leon
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help