aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2015-03-05 04:16:20 -0500
committerVineet Gupta <vgupta@synopsys.com>2015-06-19 08:39:29 -0400
commit4db27dca607aed14a852b21db02ddb530551c5eb (patch)
tree91463e5f4fb503b0abcb1fdf7837713cb3ab230d
parentdef32fad84975d5d28e070215038224ea7f0d4bc (diff)
ARC: mm: document system mem map clearly
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
-rw-r--r--arch/arc/include/asm/processor.h35
-rw-r--r--arch/arc/include/uapi/asm/page.h2
2 files changed, 17 insertions, 20 deletions
diff --git a/arch/arc/include/asm/processor.h b/arch/arc/include/asm/processor.h
index 649e4398ed8e..ee682d8e0213 100644
--- a/arch/arc/include/asm/processor.h
+++ b/arch/arc/include/asm/processor.h
@@ -100,29 +100,26 @@ extern unsigned int get_wchan(struct task_struct *p);
100 100
101#endif /* !__ASSEMBLY__ */ 101#endif /* !__ASSEMBLY__ */
102 102
103/* Kernels Virtual memory area. 103/*
104 * Unlike other architectures(MIPS, sh, cris ) ARC 700 does not have a 104 * System Memory Map on ARC
105 * "kernel translated" region (like KSEG2 in MIPS). So we use a upper part 105 *
106 * of the translated bottom 2GB for kernel virtual memory and protect 106 * ---------------------------- (lower 2G, Translated) -------------------------
107 * these pages from user accesses by disabling Ru, Eu and Wu. 107 * 0x0000_0000 0x5FFF_FFFF (user vaddr: TASK_SIZE)
108 * 0x6000_0000 0x6FFF_FFFF (reserved gutter between U/K)
109 * 0x7000_0000 0x7FFF_FFFF (kvaddr: vmalloc/modules/pkmap..)
110 *
111 * PAGE_OFFSET ---------------- (Upper 2G, Untranslated) -----------------------
112 * 0x8000_0000 0xBFFF_FFFF (kernel direct mapped)
113 * 0xC000_0000 0xFFFF_FFFF (peripheral uncached space)
114 * -----------------------------------------------------------------------------
108 */ 115 */
109#define VMALLOC_SIZE (0x10000000) /* 256M */ 116#define VMALLOC_START 0x70000000
110#define VMALLOC_START (PAGE_OFFSET - VMALLOC_SIZE) 117#define VMALLOC_SIZE (PAGE_OFFSET - VMALLOC_START)
111#define VMALLOC_END (PAGE_OFFSET) 118#define VMALLOC_END (VMALLOC_START + VMALLOC_SIZE)
112 119
113/* Most of the architectures seem to be keeping some kind of padding between
114 * userspace TASK_SIZE and PAGE_OFFSET. i.e TASK_SIZE != PAGE_OFFSET.
115 */
116#define USER_KERNEL_GUTTER 0x10000000 120#define USER_KERNEL_GUTTER 0x10000000
117 121
118/* User address space: 122#define TASK_SIZE (VMALLOC_START - USER_KERNEL_GUTTER)
119 * On ARC700, CPU allows the entire lower half of 32 bit address space to be
120 * translated. Thus potentially 2G (0:0x7FFF_FFFF) could be User vaddr space.
121 * However we steal 256M for kernel addr (0x7000_0000:0x7FFF_FFFF) and another
122 * 256M (0x6000_0000:0x6FFF_FFFF) is gutter between user/kernel spaces
123 * Thus total User vaddr space is (0:0x5FFF_FFFF)
124 */
125#define TASK_SIZE (PAGE_OFFSET - VMALLOC_SIZE - USER_KERNEL_GUTTER)
126 123
127#define STACK_TOP TASK_SIZE 124#define STACK_TOP TASK_SIZE
128#define STACK_TOP_MAX STACK_TOP 125#define STACK_TOP_MAX STACK_TOP
diff --git a/arch/arc/include/uapi/asm/page.h b/arch/arc/include/uapi/asm/page.h
index e5d41e08240c..9d129a2a1351 100644
--- a/arch/arc/include/uapi/asm/page.h
+++ b/arch/arc/include/uapi/asm/page.h
@@ -30,7 +30,7 @@
30#define PAGE_OFFSET (0x80000000) 30#define PAGE_OFFSET (0x80000000)
31#else 31#else
32#define PAGE_SIZE (1UL << PAGE_SHIFT) /* Default 8K */ 32#define PAGE_SIZE (1UL << PAGE_SHIFT) /* Default 8K */
33#define PAGE_OFFSET (0x80000000UL) /* Kernel starts at 2G onwards */ 33#define PAGE_OFFSET (0x80000000UL) /* Kernel starts at 2G onwards */
34#endif 34#endif
35 35
36#define PAGE_MASK (~(PAGE_SIZE-1)) 36#define PAGE_MASK (~(PAGE_SIZE-1))