Re: DMA mapping (was Re: [PATCH] cciss 2.6; replaces DMA masks with kernel defines)

Matthew Wilcox
2005-06-11T13:53:18Z

On Fri, Jun 10, 2005 at 07:08:11PM -0400, Lee Revell wrote:
> b44 needs 30 bit:
>
> #define B44_DMA_MASK 0x3fffffff
>
> These seem to be all over the place. I guess it saves a tiny bit of
> silicon. Don't these all violate the PCI spec?

No, it's permitted. What would violate the PCI spec would be failing
to decode the full 32/64 bit address and creating aliases (like 10-bit
ISA cards did). This is just a reestriction on which parts of memory
a card can DMA to.

> Should I just add everything from 24 to 63?

Actually, it'd be useful to have a central list of what DMA masks devices
really take. It might provide some arguments for changing the zone allocater.

--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain