John Baldwin 2db99100a4 Improve the handling of static DMA buffers that use non-default memory
attributes (currently just BUS_DMA_NOCACHE):
- Don't call pmap_change_attr() on the returned address, instead use
  kmem_alloc_contig() to ask the VM system for memory with the requested
  attribute.
- As a result, always use kmem_alloc_contig() for non-default memory
  attributes, even for sub-page allocations.  This requires adjusting
  bus_dmamem_free()'s logic for determining which free routine to use.
- For x86, add a new dummy bus_dmamap that is used for static DMA
  buffers allocated via kmem_alloc_contig().  bus_dmamem_free() can then
  use the map pointer to determine which free routine to use.
- For powerpc, add a new flag to the allocated map (bus_dmamem_alloc()
  always creates a real map on powerpc) to indicate which free routine
  should be used.

Note that the BUS_DMA_NOCACHE handling in powerpc is currently #ifdef'd out.
I have left it disabled but updated it to match x86.

Reviewed by:	scottl
MFC after:	1 month
2012-08-03 13:50:29 +00:00
..
2010-07-09 14:01:18 +00:00
2010-07-13 05:32:19 +00:00
2010-07-13 05:32:19 +00:00
MFC
2011-06-24 16:35:40 +00:00
2011-05-10 13:48:21 +00:00
2011-05-09 16:16:15 +00:00
2010-07-13 05:32:19 +00:00
2010-07-13 05:32:19 +00:00
2010-07-13 05:32:19 +00:00
2010-07-13 05:32:19 +00:00
2010-07-13 05:32:19 +00:00