[RFC] change the dma_unmap_single for arm

saeed bishara saeed.bishara at gmail.com
Wed Oct 27 10:01:37 EDT 2010


Hi,
      latest versions invalidates the buffer in order to overcome the
speculative prefetch. however, in some cases, specially network, the
data that DMAed can be much less that the buffer size, so it would be
more efficient - and correct for arm case - to use the received bytes
count rather than the buffer size. however, the linux API restricts
the size to be the same as the one passed to the dma_map_single -
which is the buffer size.
    the simplest solution that I can think of is to change the API
restriction, and make the drivers pass the received bytes count
instead of buffer size, the kernel also will provide a function to the
drivers  to permit using this hack.

saeed



More information about the linux-arm-kernel mailing list