[PATCH V2 2/3] powerpc: Add support for swiotlb on 32-bit
FUJITA Tomonori
fujita.tomonori at lab.ntt.co.jp
Fri May 22 20:51:44 EST 2009
On Thu, 21 May 2009 20:01:37 +0100
Ian Campbell <Ian.Campbell at eu.citrix.com> wrote:
> > It's not actually clear to me that we need that check, though. Can
> > someone explain what case that was designed to catch?
>
> If map_single fails and returns NULL then we try to use
> io_tlb_overflow_buffer, if that is somehow not DMA-able (for the
> particular device) then the check will trigger. I would have thought we
> could arrange that the overflow buffer is always OK and really if
> map_page is failing we must be close the edge already.
And iotlb buffers are not guaranteed to be DMA-capable; it's possible
that some drivers (with poor dma address restrictions) can't handle
some part of iotlb buffers.
So after allocating some ioblb buffer, we need to check if the buffers
are DMA-capable for a driver. Well, it's unlikely though.
Well, it would be better to move the check to map_single().
More information about the Linuxppc-dev
mailing list