]> git.baikalelectronics.ru Git - kernel.git/commit
mm: nobootmem: Correct alloc_bootmem semantics.
authorDavid Miller <davem@davemloft.net>
Wed, 25 Apr 2012 20:10:50 +0000 (16:10 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 26 Apr 2012 04:18:01 +0000 (21:18 -0700)
commit21d783165b6cbdd84c9d1105bd65903b45ed6184
treef51ab604d23af8ac0f6087516f877af5604c3477
parent1d197d168c7736756fb4f130d3bab32aac531ade
mm: nobootmem: Correct alloc_bootmem semantics.

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@davemloft.net>
Acked-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/nobootmem.c