linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* powerpc: always trim to numa memory to lmb_end_of_DRAM
@ 2008-10-21  1:37 Milton Miller
  0 siblings, 0 replies; only message in thread
From: Milton Miller @ 2008-10-21  1:37 UTC (permalink / raw)
  To: linuxppc-dev

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>
--
X-Patchwork-ID: 19577
Changelog edited.  Patch compiled on next-20081017

A previous version of this patch, id 11774, also looked if if iommu=off
was specified, but it was requested that the check just be removed.

http://oldpatchwork.ozlabs.org/linuxppc/patch?id=11774


---
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index cf4bffb..590406c 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -472,12 +472,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;
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-10-21  1:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-21  1:37 powerpc: always trim to numa memory to lmb_end_of_DRAM Milton Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).