busdma(9): Obey alignment constraint, disabled by default
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Tue, 20 Jan 2009 15:11:59 +0000 (23:11 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Tue, 17 Feb 2009 10:35:21 +0000 (18:35 +0800)
commit46fbe6c5ffb24875ef627834a5cb7a93fe176231
treee4a07280c736c2ad172a6cb189647d54d9c9eabf
parent8353f039ec87a72865eb921aaae97da0bd09568d
busdma(9): Obey alignment constraint, disabled by default

- Obey alignment constraint
  Obtained-from: FreeBSD
- Correct "cross page boundary" check in bus_dmamem_alloc()
- Make sure that after kmalloc() retry, memory will not cross page
  boundary and is properly aligned.  If not, print backtrace; should
  panic though.
- Factor out BUS_DMA_KMALLOC(), so we don't duplicate the conditions
  in bus_dmamem_alloc() and bus_dmamem_free()
- Assert the input memory is properly aligned, if caller told us so
sys/platform/pc32/i386/busdma_machdep.c