diff options
-rw-r--r-- | arch/nds32/include/asm/Kbuild | 1 | ||||
-rw-r--r-- | arch/nds32/include/asm/page.h | 3 | ||||
-rw-r--r-- | arch/nds32/kernel/stacktrace.c | 2 | ||||
-rw-r--r-- | arch/nds32/lib/copy_page.S | 3 | ||||
-rw-r--r-- | arch/nds32/mm/cacheflush.c | 22 | ||||
-rw-r--r-- | arch/nds32/mm/init.c | 1 |
6 files changed, 32 insertions, 0 deletions
diff --git a/arch/nds32/include/asm/Kbuild b/arch/nds32/include/asm/Kbuild index a64e87cc8b49..142e612aa639 100644 --- a/arch/nds32/include/asm/Kbuild +++ b/arch/nds32/include/asm/Kbuild | |||
@@ -16,6 +16,7 @@ generic-y += dma.h | |||
16 | generic-y += emergency-restart.h | 16 | generic-y += emergency-restart.h |
17 | generic-y += errno.h | 17 | generic-y += errno.h |
18 | generic-y += exec.h | 18 | generic-y += exec.h |
19 | generic-y += export.h | ||
19 | generic-y += fb.h | 20 | generic-y += fb.h |
20 | generic-y += fcntl.h | 21 | generic-y += fcntl.h |
21 | generic-y += ftrace.h | 22 | generic-y += ftrace.h |
diff --git a/arch/nds32/include/asm/page.h b/arch/nds32/include/asm/page.h index e27365c097b6..947f0491c9a7 100644 --- a/arch/nds32/include/asm/page.h +++ b/arch/nds32/include/asm/page.h | |||
@@ -27,6 +27,9 @@ extern void copy_user_highpage(struct page *to, struct page *from, | |||
27 | unsigned long vaddr, struct vm_area_struct *vma); | 27 | unsigned long vaddr, struct vm_area_struct *vma); |
28 | extern void clear_user_highpage(struct page *page, unsigned long vaddr); | 28 | extern void clear_user_highpage(struct page *page, unsigned long vaddr); |
29 | 29 | ||
30 | void copy_user_page(void *vto, void *vfrom, unsigned long vaddr, | ||
31 | struct page *to); | ||
32 | void clear_user_page(void *addr, unsigned long vaddr, struct page *page); | ||
30 | #define __HAVE_ARCH_COPY_USER_HIGHPAGE | 33 | #define __HAVE_ARCH_COPY_USER_HIGHPAGE |
31 | #define clear_user_highpage clear_user_highpage | 34 | #define clear_user_highpage clear_user_highpage |
32 | #else | 35 | #else |
diff --git a/arch/nds32/kernel/stacktrace.c b/arch/nds32/kernel/stacktrace.c index bc70113c0e84..8b231e910ea6 100644 --- a/arch/nds32/kernel/stacktrace.c +++ b/arch/nds32/kernel/stacktrace.c | |||
@@ -9,6 +9,7 @@ void save_stack_trace(struct stack_trace *trace) | |||
9 | { | 9 | { |
10 | save_stack_trace_tsk(current, trace); | 10 | save_stack_trace_tsk(current, trace); |
11 | } | 11 | } |
12 | EXPORT_SYMBOL_GPL(save_stack_trace); | ||
12 | 13 | ||
13 | void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) | 14 | void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) |
14 | { | 15 | { |
@@ -45,3 +46,4 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) | |||
45 | fpn = (unsigned long *)fpp; | 46 | fpn = (unsigned long *)fpp; |
46 | } | 47 | } |
47 | } | 48 | } |
49 | EXPORT_SYMBOL_GPL(save_stack_trace_tsk); | ||
diff --git a/arch/nds32/lib/copy_page.S b/arch/nds32/lib/copy_page.S index 4a2ff85f17ee..f8701ed161a8 100644 --- a/arch/nds32/lib/copy_page.S +++ b/arch/nds32/lib/copy_page.S | |||
@@ -2,6 +2,7 @@ | |||
2 | // Copyright (C) 2005-2017 Andes Technology Corporation | 2 | // Copyright (C) 2005-2017 Andes Technology Corporation |
3 | 3 | ||
4 | #include <linux/linkage.h> | 4 | #include <linux/linkage.h> |
5 | #include <asm/export.h> | ||
5 | #include <asm/page.h> | 6 | #include <asm/page.h> |
6 | 7 | ||
7 | .text | 8 | .text |
@@ -16,6 +17,7 @@ ENTRY(copy_page) | |||
16 | popm $r2, $r10 | 17 | popm $r2, $r10 |
17 | ret | 18 | ret |
18 | ENDPROC(copy_page) | 19 | ENDPROC(copy_page) |
20 | EXPORT_SYMBOL(copy_page) | ||
19 | 21 | ||
20 | ENTRY(clear_page) | 22 | ENTRY(clear_page) |
21 | pushm $r1, $r9 | 23 | pushm $r1, $r9 |
@@ -35,3 +37,4 @@ ENTRY(clear_page) | |||
35 | popm $r1, $r9 | 37 | popm $r1, $r9 |
36 | ret | 38 | ret |
37 | ENDPROC(clear_page) | 39 | ENDPROC(clear_page) |
40 | EXPORT_SYMBOL(clear_page) | ||
diff --git a/arch/nds32/mm/cacheflush.c b/arch/nds32/mm/cacheflush.c index bd52918d5923..ee44ad96b6ed 100644 --- a/arch/nds32/mm/cacheflush.c +++ b/arch/nds32/mm/cacheflush.c | |||
@@ -147,6 +147,25 @@ void flush_cache_vunmap(unsigned long start, unsigned long end) | |||
147 | cpu_icache_inval_all(); | 147 | cpu_icache_inval_all(); |
148 | } | 148 | } |
149 | 149 | ||
150 | void copy_user_page(void *vto, void *vfrom, unsigned long vaddr, | ||
151 | struct page *to) | ||
152 | { | ||
153 | cpu_dcache_wbinval_page((unsigned long)vaddr); | ||
154 | cpu_icache_inval_page((unsigned long)vaddr); | ||
155 | copy_page(vto, vfrom); | ||
156 | cpu_dcache_wbinval_page((unsigned long)vto); | ||
157 | cpu_icache_inval_page((unsigned long)vto); | ||
158 | } | ||
159 | |||
160 | void clear_user_page(void *addr, unsigned long vaddr, struct page *page) | ||
161 | { | ||
162 | cpu_dcache_wbinval_page((unsigned long)vaddr); | ||
163 | cpu_icache_inval_page((unsigned long)vaddr); | ||
164 | clear_page(addr); | ||
165 | cpu_dcache_wbinval_page((unsigned long)addr); | ||
166 | cpu_icache_inval_page((unsigned long)addr); | ||
167 | } | ||
168 | |||
150 | void copy_user_highpage(struct page *to, struct page *from, | 169 | void copy_user_highpage(struct page *to, struct page *from, |
151 | unsigned long vaddr, struct vm_area_struct *vma) | 170 | unsigned long vaddr, struct vm_area_struct *vma) |
152 | { | 171 | { |
@@ -213,6 +232,7 @@ void flush_dcache_page(struct page *page) | |||
213 | local_irq_restore(flags); | 232 | local_irq_restore(flags); |
214 | } | 233 | } |
215 | } | 234 | } |
235 | EXPORT_SYMBOL(flush_dcache_page); | ||
216 | 236 | ||
217 | void copy_to_user_page(struct vm_area_struct *vma, struct page *page, | 237 | void copy_to_user_page(struct vm_area_struct *vma, struct page *page, |
218 | unsigned long vaddr, void *dst, void *src, int len) | 238 | unsigned long vaddr, void *dst, void *src, int len) |
@@ -272,6 +292,7 @@ void flush_kernel_dcache_page(struct page *page) | |||
272 | cpu_dcache_wbinval_page((unsigned long)page_address(page)); | 292 | cpu_dcache_wbinval_page((unsigned long)page_address(page)); |
273 | local_irq_restore(flags); | 293 | local_irq_restore(flags); |
274 | } | 294 | } |
295 | EXPORT_SYMBOL(flush_kernel_dcache_page); | ||
275 | 296 | ||
276 | void flush_kernel_vmap_range(void *addr, int size) | 297 | void flush_kernel_vmap_range(void *addr, int size) |
277 | { | 298 | { |
@@ -301,6 +322,7 @@ void flush_icache_range(unsigned long start, unsigned long end) | |||
301 | cpu_cache_wbinval_range(start, end, 1); | 322 | cpu_cache_wbinval_range(start, end, 1); |
302 | local_irq_restore(flags); | 323 | local_irq_restore(flags); |
303 | } | 324 | } |
325 | EXPORT_SYMBOL(flush_icache_range); | ||
304 | 326 | ||
305 | void flush_icache_page(struct vm_area_struct *vma, struct page *page) | 327 | void flush_icache_page(struct vm_area_struct *vma, struct page *page) |
306 | { | 328 | { |
diff --git a/arch/nds32/mm/init.c b/arch/nds32/mm/init.c index 93ee0160720b..c713d2ad55dc 100644 --- a/arch/nds32/mm/init.c +++ b/arch/nds32/mm/init.c | |||
@@ -30,6 +30,7 @@ extern unsigned long phys_initrd_size; | |||
30 | * zero-initialized data and COW. | 30 | * zero-initialized data and COW. |
31 | */ | 31 | */ |
32 | struct page *empty_zero_page; | 32 | struct page *empty_zero_page; |
33 | EXPORT_SYMBOL(empty_zero_page); | ||
33 | 34 | ||
34 | static void __init zone_sizes_init(void) | 35 | static void __init zone_sizes_init(void) |
35 | { | 36 | { |