Re: [PATCH] mm: nobootmem: Correct alloc_bootmem semantics.

From: Tejun Heo
Date: Wed Apr 25 2012 - 16:12:48 EST


On Wed, Apr 25, 2012 at 04:10:50PM -0400, David Miller wrote:
>
> The comments above __alloc_bootmem_node() claim that the code will
> first try the allocation using 'goal' and if that fails it will
> try again but with the 'goal' requirement dropped.
>
> Unfortunately, this is not what the code does, so fix it to do so.
>
> This is important for nobootmem conversions to architectures such
> as sparc where MAX_DMA_ADDRESS is infinity.
>
> On such architectures all of the allocations done by generic spots,
> such as the sparse-vmemmap implementation, will pass in:
>
> __pa(MAX_DMA_ADDRESS)
>
> as the goal, and with the limit given as "-1" this will always fail
> unless we add the appropriate fallback logic here.
>
> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>

Acked-by: Tejun Heo <tj@xxxxxxxxxx>

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/