Subject: Re: [PATCH] DMA 4GB boundary protection

From: Segher Boessenkool <[email-masked]>
Date: Sun, 4 Mar 2007 00:32:04 +0100

> The drawback of this patch is that it adds code to every single 
> allocation.
> Instead, you should just mark the last entry before the 4GB boundary
> as allocated when you setup the bitmaps for the table. That way, no
> allocation will ever be able to cross over.

Jake said that this bug happens when crossing _any_ 4GB
boundary, so that means reserving a few more blocks.

> Even nicer would be to only do it when a boot option is specified, so
> we actually have a chance to expose and find the driver bugs instead of
> papering them over.

Almost all drivers (*) that can do DAC already avoid
crossing the SAC-to-DAC boundary.  I have never heard
about a card having the bug on _any_ 4GB crossing, I
doubt they are that common.  Just fix the drivers :-)

(*) Well, amongst those that matter and have this bug.

Segher