Re: consistent_dma_mask is a ghost?

Pete Zaitcev
2003-08-13T00:11:26Z

> This means that only _two_ platforms, ia64 and x86_64, have means to use
> that information, and other platforms use set_dma_mask() and dev->dma_mask
> for consistent (coherent) allocations ignoring consistent_dma_mask at all
> (and possibly allocating memory from invalid region, if the masks are
> not equal).

Platforms which worked correctly before continue to work
correctly thereafter. IMHO, the whole thing is a kludge,
designed to support AIC7xxx on SGI SN-2, and that's about
all it does. There's a device which uses fewer DMA bits
when it accesses its mailbox than when it accesses data.
Since the mailbox is allocated in consistent memory, this
can be used as a clue to restrict the allocation. This is a
fragile, opaque construct and it's conceptually wrong (what if
the driver accessed device mailboxes through streaming mappings?),
but it works for its purpose. Just don't use it in your drivers
and you'll be fine.

-- Pete