> Date: Wed, 14 Mar 2012 02:25:02 +0100
> From: Tobias Ulmer <[email protected]>
> 
> I have a couple of machines with an EHCI controller that refuses to work
> with memory above 2G, causing all kinds of trouble. This diff enables
> setting a bus_dma boundary and allows me to make off-site backups again.

Setting the bus_dma boundary to 2G doesn't restrict the memory to be
allocated below the 2G boundary.  It just prevents memory being
allocated *across* the 2G boundary (i.e. start just before the 2G and
end after it).

Now it may be that the actual restriction of the buggy nvidia
controllers is that you may not cross a 2GB boundary, but it would be
pretty unlikely that you hit that case.  So I guess you're just
getting lucky that by enforcing the 2G boundary the page allocator
decides to give you pages below 2G.  At some point, if memory under 2G
is getting scarce the allocator will hand you memory above the 2G
boundary and things break.

The proper way to fix this is probably to make bus_dmamem_alloc_range()
a full member of the bus_dma family and use that to allocate memory
below 2G boundary.

Reply via email to