[PATCH] numa: enforce iommu-off memory address limit
From: Milton Miller <hidden>
Date: 2007-06-15 18:54:51
Don't short circuit the lmb_end_of_DRAM if iommu_is_off. If linux,iommu-off is in /chosen (because iommu=off was on the command line), we limit the memory when adding it to the lmbs and page tables, but not when numa parses the device tree for numa affinity. When we free bootmem, we then try to use these pages without mapping them or allocating supporting data structures resulting in bad_page and/or data storage interrupts. Signed-off-by: Milton Miller <redacted> --- Paul, I think this can wait for 2.6.23 although its small enough if you want to send it for 2.6.22. Index: kernel/arch/powerpc/mm/numa.c ===================================================================
--- kernel.orig/arch/powerpc/mm/numa.c 2007-06-15 01:10:19.000000000 -0500
+++ kernel/arch/powerpc/mm/numa.c 2007-06-15 01:41:32.000000000 -0500@@ -21,6 +21,7 @@ #include <asm/lmb.h> #include <asm/system.h> #include <asm/smp.h> +#include <asm/iommu.h> static int numa_enabled = 1;
@@ -286,7 +287,7 @@ static unsigned long __init numa_enforce * having memory holes below the limit. */ - if (! memory_limit) + if (!memory_limit && !iommu_is_off) return size; if (start + size <= lmb_end_of_DRAM())