[openib-general] IB/ipath - Implement new verbs DMA mapping functions
Or Gerlitz
or.gerlitz at gmail.com
Mon Nov 13 12:02:45 PST 2006
On 11/13/06, Roland Dreier <rdreier at cisco.com> wrote:
> > This is a bug since there are architectures eg PPC64 where the native
> > address size is u64 but dma_addr_t is u32. You are somehow in a
> > problem here, since returning an unchopped cpu_addr to the consumer
> > might cause a memory corruption as they are expecting 32 bit value.
>
> Yes (although ppc64 is now u64 -- sparc64 is still u32 though). I
> think this means we need to make these ib_dma_xxx functions return u64
> instead of dma_addr_t.
This would require to change all the places where an ib drivers uses
dma_addr_t to hold the result of dma_map_xxx (single, page), also note
that dma_map_sg writes on the sg elements, to a field whose type is
dma_addr_t, so Ralph would to keep a ghost of each sg element since
the dma_addr_t field (eg under sparc) can not hold a u64 address...
Ralph/Roland - my hope is that there might be some other way to get
out of the ipath driver problem, how about presenting the problem to
LKML and see if someone comes out with a solution we did not think
about?
Or.
More information about the general
mailing list