dect
/
linux-2.6
Archived
13
0
Fork 0

powerpc: Always trim numa memory to lmb_end_of_DRAM()

numa_enforce_memory_limit tried to be smart and only call lmb_end_of_DRAM
when a memory limit was set via mem= on the command line.  However,
the early boot code will also limit memory added to the lmb system
when iommu=off is specified.  When this happens, the page allocator
is given pages not in the linear mapping and this results in a fatal
data reference to the unmapped page.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
Milton Miller 2008-10-20 15:37:04 +00:00 committed by Benjamin Herrenschmidt
parent 6a75a6b8e8
commit fe55249d17
1 changed files with 2 additions and 4 deletions

View File

@ -528,12 +528,10 @@ static unsigned long __init numa_enforce_memory_limit(unsigned long start,
/*
* We use lmb_end_of_DRAM() in here instead of memory_limit because
* we've already adjusted it for the limit and it takes care of
* having memory holes below the limit.
* having memory holes below the limit. Also, in the case of
* iommu_is_off, memory_limit is not set but is implicitly enforced.
*/
if (! memory_limit)
return size;
if (start + size <= lmb_end_of_DRAM())
return size;