On Mon, 11 Jun 2007, Håvard Skinnemoen wrote:
> I think it's best to ensure that memory returned by kmalloc() actually
> can be used for DMA. I used to work around this problem in the SPI
> controller driver by using a temporary DMA buffer when possible
> misalignment was detected, but David Brownell said it was the wrong
> way to do it and pointed at the above paragraph.
Well there are various ways of doing DMA. Memory returned can be used for
DMA but it may not be suitable for your DMA device if that device has
issues like alignment or physical address size restrictions.
We should probably make the minimum slab size dependent on
ARCH_KMALLOC_MINALIGN. There is no point in having smaller slabs anyways.
They will all have the same size.