DMA consistent allocation is limited to 2MB on 2.6.11 for ppc440?

Shawn Jin shawnxjin at gmail.com
Sat May 21 09:51:22 EST 2005


First of all thanks for your attention. :)

> Why are you using consistent memory for your DMA buffers?

Both CPU and IO controller (e.g. FC controller) have to be aware of
changes the other party makes on the data buffer. Some architectures
guarantee this coherence through bus snooping, which ppc440 is
unfortunately lack of. The simplest solution is to use consistent
memory.. On 2.4.x to some extent we don't need worry about how much
consistent memory is available. So the developers used consistent
mappings a lot instead of streaming DMA mappings. We would have been
more conservative to use consistent mappings had we known the
limitation earlier.

> The difference with this implementation is that it doesn't allow for
> arbitrarily huge consistent allocations by default.  However, I carefully
> placed a comment at the top to point people to the advanced setup
> menu where they can tune the consistent pool to be larger than the
> 2MB default.  You simply have to understand the memory map of your

I noticed your comment about the advanced settings:
CONFIG_CONSISTENT_SIZE and _START. However simply increasing the value
of CONSISTENT_SIZE won't get rid of the limiation. Right? The root
cause is in consistent_pte, which is only one page. It may be good to
have consistent_pte have more than one pages according to the
CONSISTENT_SIZE. Is it a useful fix?

> board port when setting this option.  You can break things as with
> other advanced setup menu options.

OK. Have to be very careful here.

Best regards,
-Shawn.



More information about the Linuxppc-embedded mailing list