diff options
author | Milton Miller <miltonm@bga.com> | 2008-10-20 15:37:04 +0000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-10-21 15:19:12 +1100 |
commit | fe55249d17f7979cf9bbc58e38e9ceaf1918b415 (patch) | |
tree | f02da5bb8437bcba4e38a760eef2b77f9a52d0a5 /arch/powerpc/mm | |
parent | 6a75a6b8e85e92cc774d42a4e113c76c30b5a539 (diff) | |
download | linux-fe55249d17f7979cf9bbc58e38e9ceaf1918b415.tar.gz linux-fe55249d17f7979cf9bbc58e38e9ceaf1918b415.tar.bz2 linux-fe55249d17f7979cf9bbc58e38e9ceaf1918b415.zip |
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>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r-- | arch/powerpc/mm/numa.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 195bfcd08959..eb505ad34a85 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -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; |