From 2c117c2cf5f092166f5ba500444829742049a6a3 Mon Sep 17 00:00:00 2001
From: Thomas Chou <thomas@wytron.com.tw>
Date: Wed, 19 Dec 2007 10:35:45 +0800
Subject: [PATCH] nios2: allow allocating memory blocks up to 32MB

The previous CONFIG_LARGE_ALLOCS flag was replaced by the new
CONFIG_FORCE_MAX_ZONEORDER flag to override the default in mmzone.h,
which is 4MB.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>

diff --git a/linux-2.6.x/arch/nios2nommu/Kconfig b/linux-2.6.x/arch/nios2nommu/Kconfig
index 8e87a11..ea8b6ed 100644
--- a/linux-2.6.x/arch/nios2nommu/Kconfig
+++ b/linux-2.6.x/arch/nios2nommu/Kconfig
@@ -198,13 +198,9 @@ config BREAK_ON_START
 	  before the kernel starts initialization. This allows you to
 	  debug the kernel startup.
 
-config LARGE_ALLOCS
-	bool "Allow allocating large blocks (> 1MB) of memory"
-	help
-	  Allow the slab memory allocator to keep chains for very large
-	  memory sizes - upto 32MB. You may need this if your system has
-	  a lot of RAM, and you need to able to allocate very large
-	  contiguous chunks. If unsure, say N.
+config FORCE_MAX_ZONEORDER
+	int
+	default "14"
 
 choice
 	prompt "Kernel executes from"
diff --git a/linux-2.6.x/arch/nios2nommu/defconfig b/linux-2.6.x/arch/nios2nommu/defconfig
index 40629cb..2bf89dd 100644
--- a/linux-2.6.x/arch/nios2nommu/defconfig
+++ b/linux-2.6.x/arch/nios2nommu/defconfig
@@ -114,7 +114,7 @@ CONFIG_NIOS2_HW_MUL=y
 #
 CONFIG_EXCALIBUR=y
 # CONFIG_BREAK_ON_START is not set
-CONFIG_LARGE_ALLOCS=y
+CONFIG_FORCE_MAX_ZONEORDER=14
 CONFIG_RAMKERNEL=y
 CONFIG_PREEMPT=y
 # CONFIG_PREEMPT_TIMES is not set
diff --git a/vendors/Altera/nios2nommu/config.linux-2.6.x b/vendors/Altera/nios2nommu/config.linux-2.6.x
index 0f1541d..93a70c3 100644
--- a/vendors/Altera/nios2nommu/config.linux-2.6.x
+++ b/vendors/Altera/nios2nommu/config.linux-2.6.x
@@ -116,7 +116,7 @@ CONFIG_NIOS2_HW_MUL=y
 #
 CONFIG_EXCALIBUR=y
 # CONFIG_BREAK_ON_START is not set
-CONFIG_LARGE_ALLOCS=y
+CONFIG_FORCE_MAX_ZONEORDER=14
 CONFIG_RAMKERNEL=y
 CONFIG_PREEMPT=y
 # CONFIG_PREEMPT_TIMES is not set
-- 
1.5.3.5

