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())
On Fri, 2007-06-15 at 12:33 -0500, Milton Miller wrote:
quoted hunk
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;
I'd rather just remove the check entirely, and rename the routine -
numa_check_end_of_ram() or something.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person