From 56bf341335726cbfec392f7524ec0c393840335e Mon Sep 17 00:00:00 2001 From: Mursalin Akon Date: Mon, 30 Jan 2012 17:20:44 -0800 Subject: arm: include: make module space configurable Make the module space a configurable option. The default value remains 16. The main goal of this CL is to enable large module, such as resman module of nvidia. Change-Id: I8a775a6a23c1a75562917d8ab8e4bbe29f08d7e5 Signed-off-by: Mursalin Akon (cherry picked from commit 40aaad75bd32822137033fc7972d41ee30ff7bc9) Reviewed-on: http://git-master/r/91322 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Eric Brower Reviewed-by: Allen Martin --- arch/arm/Kconfig | 43 +++++++++++++++++++++++++++++++++++++++++++ arch/arm/include/asm/memory.h | 4 ++-- 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 1f35b63f8701..3c3b868948aa 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1479,6 +1479,49 @@ config PAGE_OFFSET default 0x80000000 if VMSPLIT_2G default 0xC0000000 +choice + prompt "Task size" + depends on MMU + default TASK_SIZE_1G_LESS_16M if VMSPLIT_1G + default TASK_SIZE_2G_LESS_16M if VMSPLIT_2G + default TASK_SIZE_3G_LESS_16M + +config TASK_SIZE_1G_LESS_16M + bool "Task size is 1GiB less 16MiB" + depends on VMSPLIT_1G + +config TASK_SIZE_1G_LESS_24M + bool "Task size is 1GiB less 24MiB" + depends on VMSPLIT_1G + +config TASK_SIZE_2G_LESS_16M + bool "Task size is 2GiB less 16MiB" + depends on VMSPLIT_2G + +config TASK_SIZE_2G_LESS_24M + bool "Task size is 2GiB less 24MiB" + depends on VMSPLIT_2G + +config TASK_SIZE_3G_LESS_16M + bool "Task size is 3GiB less 16MiB" + depends on VMSPLIT_3G + +config TASK_SIZE_3G_LESS_24M + bool "Task size is 3GiB less 24MiB" + depends on VMSPLIT_3G + +endchoice + +config TASK_SIZE + hex + depends on MMU + default 0x3E800000 if TASK_SIZE_1G_LESS_24M + default 0x3F000000 if TASK_SIZE_1G_LESS_16M + default 0x7E800000 if TASK_SIZE_2G_LESS_24M + default 0x7F000000 if TASK_SIZE_2G_LESS_16M + default 0xBE800000 if TASK_SIZE_3G_LESS_24M + default 0xBF000000 + config NR_CPUS int "Maximum number of CPUs (2-32)" range 2 32 diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index b8de516e600e..25669795d80d 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h @@ -33,7 +33,7 @@ * TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area */ #define PAGE_OFFSET UL(CONFIG_PAGE_OFFSET) -#define TASK_SIZE (UL(CONFIG_PAGE_OFFSET) - UL(0x01000000)) +#define TASK_SIZE UL(CONFIG_TASK_SIZE) #define TASK_UNMAPPED_BASE (UL(CONFIG_PAGE_OFFSET) / 3) /* @@ -46,7 +46,7 @@ * and PAGE_OFFSET - it must be within 32MB of the kernel text. */ #ifndef CONFIG_THUMB2_KERNEL -#define MODULES_VADDR (PAGE_OFFSET - 16*1024*1024) +#define MODULES_VADDR UL(CONFIG_TASK_SIZE) #else /* smaller range for Thumb-2 symbols relocation (2^24)*/ #define MODULES_VADDR (PAGE_OFFSET - 8*1024*1024) -- cgit v1.2.3