[Cbe-oss-dev] [patch 07/16] powerpc and x86_64: Initial port of PCIe endpoint device driver for Axon

Arnd Bergmann arnd at arndb.de
Fri Mar 14 09:48:47 EST 2008


On Thursday 13 March 2008, Tim Schimke wrote:

> > It looks like you pass the user page directly into the iommu mapping,
> which
> > might be highly dangerous for anything except page cache or hugepages.
> > How is this code expected to deal with SPU local store pages while the
> > SPU is context switched?
> >
> SPU local store pages are not supported. Is there a check that could be
> added to detect this and reject the request?

It seems that the current get_user_pages() has a check for IO pages in
it that would save you here. It might need more investigation, but
it could be that it's doing exactly the right thing already.

> > As mentioned a few times before, sg_dma_address() should return the
> > address with the right offset as it came from dma_map_sg, and not
> > require local_phys_to_plb5() here.
> >
> This is the translation required to convert the address to the form needed
> internally by the AXON DMA controller HW. It is done here to move the
> translation
> time off of the DMA setup path. Arguably it should be done by the DMA
> controller
> code instead, but this performs slightly better.

Why would it be faster to do it in the driver than to do it in the
dma mapping? AFAICS, in both cases it's only the addition of one offset
at when the mapping is established.

	Arnd <><



More information about the cbe-oss-dev mailing list