aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc/include/asm/processor.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arc/include/asm/processor.h')
-rw-r--r--arch/arc/include/asm/processor.h51
1 files changed, 39 insertions, 12 deletions
diff --git a/arch/arc/include/asm/processor.h b/arch/arc/include/asm/processor.h
index 1d694c1ef6d6..f9048994b22f 100644
--- a/arch/arc/include/asm/processor.h
+++ b/arch/arc/include/asm/processor.h
@@ -57,9 +57,19 @@ struct task_struct;
57 * A lot of busy-wait loops in SMP are based off of non-volatile data otherwise 57 * A lot of busy-wait loops in SMP are based off of non-volatile data otherwise
58 * get optimised away by gcc 58 * get optimised away by gcc
59 */ 59 */
60#define cpu_relax() __asm__ __volatile__ ("" : : : "memory") 60#ifndef CONFIG_EZNPS_MTM_EXT
61 61
62#define cpu_relax_lowlatency() cpu_relax() 62#define cpu_relax() barrier()
63#define cpu_relax_lowlatency() cpu_relax()
64
65#else
66
67#define cpu_relax() \
68 __asm__ __volatile__ (".word %0" : : "i"(CTOP_INST_SCHD_RW) : "memory")
69
70#define cpu_relax_lowlatency() barrier()
71
72#endif
63 73
64#define copy_segments(tsk, mm) do { } while (0) 74#define copy_segments(tsk, mm) do { } while (0)
65#define release_segments(mm) do { } while (0) 75#define release_segments(mm) do { } while (0)
@@ -97,7 +107,7 @@ extern unsigned int get_wchan(struct task_struct *p);
97#endif /* !__ASSEMBLY__ */ 107#endif /* !__ASSEMBLY__ */
98 108
99/* 109/*
100 * System Memory Map on ARC 110 * Default System Memory Map on ARC
101 * 111 *
102 * ---------------------------- (lower 2G, Translated) ------------------------- 112 * ---------------------------- (lower 2G, Translated) -------------------------
103 * 0x0000_0000 0x5FFF_FFFF (user vaddr: TASK_SIZE) 113 * 0x0000_0000 0x5FFF_FFFF (user vaddr: TASK_SIZE)
@@ -109,20 +119,37 @@ extern unsigned int get_wchan(struct task_struct *p);
109 * 0xC000_0000 0xFFFF_FFFF (peripheral uncached space) 119 * 0xC000_0000 0xFFFF_FFFF (peripheral uncached space)
110 * ----------------------------------------------------------------------------- 120 * -----------------------------------------------------------------------------
111 */ 121 */
112#define VMALLOC_START 0x70000000
113 122
114/* 123#define TASK_SIZE 0x60000000
115 * 1 PGDIR_SIZE each for fixmap/pkmap, 2 PGDIR_SIZE gutter
116 * See asm/highmem.h for details
117 */
118#define VMALLOC_SIZE (PAGE_OFFSET - VMALLOC_START - PGDIR_SIZE * 4)
119#define VMALLOC_END (VMALLOC_START + VMALLOC_SIZE)
120 124
121#define USER_KERNEL_GUTTER 0x10000000 125#define VMALLOC_START (PAGE_OFFSET - (CONFIG_ARC_KVADDR_SIZE << 20))
122 126
123#define TASK_SIZE (VMALLOC_START - USER_KERNEL_GUTTER) 127/* 1 PGDIR_SIZE each for fixmap/pkmap, 2 PGDIR_SIZE gutter (see asm/highmem.h) */
128#define VMALLOC_SIZE ((CONFIG_ARC_KVADDR_SIZE << 20) - PGDIR_SIZE * 4)
124 129
130#define VMALLOC_END (VMALLOC_START + VMALLOC_SIZE)
131
132#define USER_KERNEL_GUTTER (VMALLOC_START - TASK_SIZE)
133
134#ifdef CONFIG_ARC_PLAT_EZNPS
135/* NPS architecture defines special window of 129M in user address space for
136 * special memory areas, when accessing this window the MMU do not use TLB.
137 * Instead MMU direct the access to:
138 * 0x57f00000:0x57ffffff -- 1M of closely coupled memory (aka CMEM)
139 * 0x58000000:0x5fffffff -- 16 huge pages, 8M each, with fixed map (aka FMTs)
140 *
141 * CMEM - is the fastest memory we got and its size is 16K.
142 * FMT - is used to map either to internal/external memory.
143 * Internal memory is the second fast memory and its size is 16M
144 * External memory is the biggest memory (16G) and also the slowest.
145 *
146 * STACK_TOP need to be PMD align (21bit) that is why we supply 0x57e00000.
147 */
148#define STACK_TOP 0x57e00000
149#else
125#define STACK_TOP TASK_SIZE 150#define STACK_TOP TASK_SIZE
151#endif
152
126#define STACK_TOP_MAX STACK_TOP 153#define STACK_TOP_MAX STACK_TOP
127 154
128/* This decides where the kernel will search for a free chunk of vm 155/* This decides where the kernel will search for a free chunk of vm