Re: [PATCH 1/4] block: use ARCH_KMALLOC_MINALIGN as the default dma pad mask

Paul Mundt
2008-05-20T09:57:12Z

On Tue, May 20, 2008 at 02:31:29AM -0700, Andrew Morton wrote:
> Why does ARCH_KMALLOC_MINALIGN even exist? What is its mandate? Sigh.
>
> It's not really related to your patch (although your patch compounds
> the problem a little). But we should sit down and work out what we
> actually want to do here. Something like:
>
> In each architecture's arch/foo/Kconfig, define
>
> CONFIG_ARCH_DMA_ALIGN
>
> and
>
> CONFIG_ARCH_64BIT_POINTER_ALIGN
>
> and then use them. Note that these have nothing to do with each other,
> as far as I can tell.
>
> Which leaves the question: "what should slab use"? Maybe
> CONFIG_ARCH_DMA_ALIGN? But that depends what ARCH_KMALLOC_MINALIGN is
> supposed to exist for.
>
> ick.
>
The only platforms that set ARCH_KMALLOC_MINALIGN appear to do so for DMA
alignment reasons, so your Kconfig option there seems reasonable.

The ARCH_SLAB_MINALIGN you can blame me for: