aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2008-08-25 16:03:32 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-09-01 07:06:33 -0400
commit8d5796d2ec6b5a4e7a52861144e63af438d6f8f7 (patch)
tree9c348b627862a7408aeafdee30cacb08ea69fd60 /arch/arm
parent2d4b6c9aeb94cb9cb5c250f23e81e6d00b461372 (diff)
[ARM] 5222/1: Allow configuring user:kernel split via Kconfig
This patch adds a config option (CONFIG_VMSPLIT_*) to allow choosing between 3:1, 2:2 and 1:3 user:kernel memory splits. Tested-by: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Kconfig24
-rw-r--r--arch/arm/include/asm/memory.h30
-rw-r--r--arch/arm/mach-footbridge/include/mach/memory.h10
-rw-r--r--arch/arm/mach-iop13xx/include/mach/memory.h3
4 files changed, 34 insertions, 33 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index c6b248d19c79..4eb816c4df7d 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -311,6 +311,7 @@ config ARCH_IOP13XX
311 select PLAT_IOP 311 select PLAT_IOP
312 select PCI 312 select PCI
313 select ARCH_SUPPORTS_MSI 313 select ARCH_SUPPORTS_MSI
314 select VMSPLIT_1G
314 help 315 help
315 Support for Intel's IOP13XX (XScale) family of processors. 316 Support for Intel's IOP13XX (XScale) family of processors.
316 317
@@ -739,6 +740,29 @@ config SMP
739 740
740 If you don't know what to do here, say N. 741 If you don't know what to do here, say N.
741 742
743choice
744 prompt "Memory split"
745 default VMSPLIT_3G
746 help
747 Select the desired split between kernel and user memory.
748
749 If you are not absolutely sure what you are doing, leave this
750 option alone!
751
752 config VMSPLIT_3G
753 bool "3G/1G user/kernel split"
754 config VMSPLIT_2G
755 bool "2G/2G user/kernel split"
756 config VMSPLIT_1G
757 bool "1G/3G user/kernel split"
758endchoice
759
760config PAGE_OFFSET
761 hex
762 default 0x40000000 if VMSPLIT_1G
763 default 0x80000000 if VMSPLIT_2G
764 default 0xC0000000
765
742config NR_CPUS 766config NR_CPUS
743 int "Maximum number of CPUs (2-32)" 767 int "Maximum number of CPUs (2-32)"
744 range 2 32 768 range 2 32
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index bf7c737c9226..7e8d22fef29c 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -13,30 +13,27 @@
13#ifndef __ASM_ARM_MEMORY_H 13#ifndef __ASM_ARM_MEMORY_H
14#define __ASM_ARM_MEMORY_H 14#define __ASM_ARM_MEMORY_H
15 15
16#include <linux/compiler.h>
17#include <linux/const.h>
18#include <mach/memory.h>
19#include <asm/sizes.h>
20
16/* 21/*
17 * Allow for constants defined here to be used from assembly code 22 * Allow for constants defined here to be used from assembly code
18 * by prepending the UL suffix only with actual C code compilation. 23 * by prepending the UL suffix only with actual C code compilation.
19 */ 24 */
20#ifndef __ASSEMBLY__ 25#define UL(x) _AC(x, UL)
21#define UL(x) (x##UL)
22#else
23#define UL(x) (x)
24#endif
25
26#include <linux/compiler.h>
27#include <mach/memory.h>
28#include <asm/sizes.h>
29 26
30#ifdef CONFIG_MMU 27#ifdef CONFIG_MMU
31 28
32#ifndef TASK_SIZE
33/* 29/*
30 * PAGE_OFFSET - the virtual address of the start of the kernel image
34 * TASK_SIZE - the maximum size of a user space task. 31 * TASK_SIZE - the maximum size of a user space task.
35 * TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area 32 * TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area
36 */ 33 */
37#define TASK_SIZE UL(0xbf000000) 34#define PAGE_OFFSET UL(CONFIG_PAGE_OFFSET)
38#define TASK_UNMAPPED_BASE UL(0x40000000) 35#define TASK_SIZE (UL(CONFIG_PAGE_OFFSET) - UL(0x01000000))
39#endif 36#define TASK_UNMAPPED_BASE (UL(CONFIG_PAGE_OFFSET) / 3)
40 37
41/* 38/*
42 * The maximum size of a 26-bit user space task. 39 * The maximum size of a 26-bit user space task.
@@ -44,13 +41,6 @@
44#define TASK_SIZE_26 UL(0x04000000) 41#define TASK_SIZE_26 UL(0x04000000)
45 42
46/* 43/*
47 * Page offset: 3GB
48 */
49#ifndef PAGE_OFFSET
50#define PAGE_OFFSET UL(0xc0000000)
51#endif
52
53/*
54 * The module space lives between the addresses given by TASK_SIZE 44 * The module space lives between the addresses given by TASK_SIZE
55 * and PAGE_OFFSET - it must be within 32MB of the kernel text. 45 * and PAGE_OFFSET - it must be within 32MB of the kernel text.
56 */ 46 */
diff --git a/arch/arm/mach-footbridge/include/mach/memory.h b/arch/arm/mach-footbridge/include/mach/memory.h
index e9cae99dd1f9..6ae2f1a07ab9 100644
--- a/arch/arm/mach-footbridge/include/mach/memory.h
+++ b/arch/arm/mach-footbridge/include/mach/memory.h
@@ -42,10 +42,6 @@ extern unsigned long __bus_to_virt(unsigned long);
42 42
43#endif 43#endif
44 44
45/* Task size and page offset at 3GB */
46#define TASK_SIZE UL(0xbf000000)
47#define PAGE_OFFSET UL(0xc0000000)
48
49/* 45/*
50 * Cache flushing area. 46 * Cache flushing area.
51 */ 47 */
@@ -56,12 +52,6 @@ extern unsigned long __bus_to_virt(unsigned long);
56 */ 52 */
57#define PHYS_OFFSET UL(0x00000000) 53#define PHYS_OFFSET UL(0x00000000)
58 54
59/*
60 * This decides where the kernel will search for a free chunk of vm
61 * space during mmap's.
62 */
63#define TASK_UNMAPPED_BASE ((TASK_SIZE + 0x01000000) / 3)
64
65#define FLUSH_BASE_PHYS 0x50000000 55#define FLUSH_BASE_PHYS 0x50000000
66 56
67#endif 57#endif
diff --git a/arch/arm/mach-iop13xx/include/mach/memory.h b/arch/arm/mach-iop13xx/include/mach/memory.h
index e8b59d8f1bb9..a74b027432d2 100644
--- a/arch/arm/mach-iop13xx/include/mach/memory.h
+++ b/arch/arm/mach-iop13xx/include/mach/memory.h
@@ -7,9 +7,6 @@
7 * Physical DRAM offset. 7 * Physical DRAM offset.
8 */ 8 */
9#define PHYS_OFFSET UL(0x00000000) 9#define PHYS_OFFSET UL(0x00000000)
10#define TASK_SIZE UL(0x3f000000)
11#define PAGE_OFFSET UL(0x40000000)
12#define TASK_UNMAPPED_BASE ((TASK_SIZE + 0x01000000) / 3)
13 10
14#ifndef __ASSEMBLY__ 11#ifndef __ASSEMBLY__
15 12