Commit e3f46243 authored by Greentime Hu's avatar Greentime Hu

nds32: Fix the symbols undefined issue by exporting them.

It broke the 'allmodconfig' build.
  LD      vmlinux
  SYSMAP  System.map
  Building modules, stage 2.
  MODPOST 5028 modules
ERROR: "flush_dcache_page" [net/sunrpc/xprtrdma/rpcrdma.ko] undefined!
ERROR: "empty_zero_page" [net/ceph/libceph.ko] undefined!
ERROR: "save_stack_trace" [kernel/backtracetest.ko] undefined!
ERROR: "clear_page" [fs/ocfs2/dlm/ocfs2_dlm.ko] undefined!
ERROR: "copy_page" [fs/nilfs2/nilfs2.ko] undefined!
...
Signed-off-by: default avatarGreentime Hu <greentime@andestech.com>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 03969d0b
...@@ -16,6 +16,7 @@ generic-y += dma.h ...@@ -16,6 +16,7 @@ generic-y += dma.h
generic-y += emergency-restart.h generic-y += emergency-restart.h
generic-y += errno.h generic-y += errno.h
generic-y += exec.h generic-y += exec.h
generic-y += export.h
generic-y += fb.h generic-y += fb.h
generic-y += fcntl.h generic-y += fcntl.h
generic-y += ftrace.h generic-y += ftrace.h
......
...@@ -27,6 +27,9 @@ extern void copy_user_highpage(struct page *to, struct page *from, ...@@ -27,6 +27,9 @@ extern void copy_user_highpage(struct page *to, struct page *from,
unsigned long vaddr, struct vm_area_struct *vma); unsigned long vaddr, struct vm_area_struct *vma);
extern void clear_user_highpage(struct page *page, unsigned long vaddr); extern void clear_user_highpage(struct page *page, unsigned long vaddr);
void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
struct page *to);
void clear_user_page(void *addr, unsigned long vaddr, struct page *page);
#define __HAVE_ARCH_COPY_USER_HIGHPAGE #define __HAVE_ARCH_COPY_USER_HIGHPAGE
#define clear_user_highpage clear_user_highpage #define clear_user_highpage clear_user_highpage
#else #else
......
...@@ -9,6 +9,7 @@ void save_stack_trace(struct stack_trace *trace) ...@@ -9,6 +9,7 @@ void save_stack_trace(struct stack_trace *trace)
{ {
save_stack_trace_tsk(current, trace); save_stack_trace_tsk(current, trace);
} }
EXPORT_SYMBOL_GPL(save_stack_trace);
void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
{ {
...@@ -45,3 +46,4 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) ...@@ -45,3 +46,4 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
fpn = (unsigned long *)fpp; fpn = (unsigned long *)fpp;
} }
} }
EXPORT_SYMBOL_GPL(save_stack_trace_tsk);
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
// Copyright (C) 2005-2017 Andes Technology Corporation // Copyright (C) 2005-2017 Andes Technology Corporation
#include <linux/linkage.h> #include <linux/linkage.h>
#include <asm/export.h>
#include <asm/page.h> #include <asm/page.h>
.text .text
...@@ -16,6 +17,7 @@ ENTRY(copy_page) ...@@ -16,6 +17,7 @@ ENTRY(copy_page)
popm $r2, $r10 popm $r2, $r10
ret ret
ENDPROC(copy_page) ENDPROC(copy_page)
EXPORT_SYMBOL(copy_page)
ENTRY(clear_page) ENTRY(clear_page)
pushm $r1, $r9 pushm $r1, $r9
...@@ -35,3 +37,4 @@ ENTRY(clear_page) ...@@ -35,3 +37,4 @@ ENTRY(clear_page)
popm $r1, $r9 popm $r1, $r9
ret ret
ENDPROC(clear_page) ENDPROC(clear_page)
EXPORT_SYMBOL(clear_page)
...@@ -147,6 +147,25 @@ void flush_cache_vunmap(unsigned long start, unsigned long end) ...@@ -147,6 +147,25 @@ void flush_cache_vunmap(unsigned long start, unsigned long end)
cpu_icache_inval_all(); cpu_icache_inval_all();
} }
void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
struct page *to)
{
cpu_dcache_wbinval_page((unsigned long)vaddr);
cpu_icache_inval_page((unsigned long)vaddr);
copy_page(vto, vfrom);
cpu_dcache_wbinval_page((unsigned long)vto);
cpu_icache_inval_page((unsigned long)vto);
}
void clear_user_page(void *addr, unsigned long vaddr, struct page *page)
{
cpu_dcache_wbinval_page((unsigned long)vaddr);
cpu_icache_inval_page((unsigned long)vaddr);
clear_page(addr);
cpu_dcache_wbinval_page((unsigned long)addr);
cpu_icache_inval_page((unsigned long)addr);
}
void copy_user_highpage(struct page *to, struct page *from, void copy_user_highpage(struct page *to, struct page *from,
unsigned long vaddr, struct vm_area_struct *vma) unsigned long vaddr, struct vm_area_struct *vma)
{ {
...@@ -213,6 +232,7 @@ void flush_dcache_page(struct page *page) ...@@ -213,6 +232,7 @@ void flush_dcache_page(struct page *page)
local_irq_restore(flags); local_irq_restore(flags);
} }
} }
EXPORT_SYMBOL(flush_dcache_page);
void copy_to_user_page(struct vm_area_struct *vma, struct page *page, void copy_to_user_page(struct vm_area_struct *vma, struct page *page,
unsigned long vaddr, void *dst, void *src, int len) unsigned long vaddr, void *dst, void *src, int len)
...@@ -272,6 +292,7 @@ void flush_kernel_dcache_page(struct page *page) ...@@ -272,6 +292,7 @@ void flush_kernel_dcache_page(struct page *page)
cpu_dcache_wbinval_page((unsigned long)page_address(page)); cpu_dcache_wbinval_page((unsigned long)page_address(page));
local_irq_restore(flags); local_irq_restore(flags);
} }
EXPORT_SYMBOL(flush_kernel_dcache_page);
void flush_kernel_vmap_range(void *addr, int size) void flush_kernel_vmap_range(void *addr, int size)
{ {
...@@ -301,6 +322,7 @@ void flush_icache_range(unsigned long start, unsigned long end) ...@@ -301,6 +322,7 @@ void flush_icache_range(unsigned long start, unsigned long end)
cpu_cache_wbinval_range(start, end, 1); cpu_cache_wbinval_range(start, end, 1);
local_irq_restore(flags); local_irq_restore(flags);
} }
EXPORT_SYMBOL(flush_icache_range);
void flush_icache_page(struct vm_area_struct *vma, struct page *page) void flush_icache_page(struct vm_area_struct *vma, struct page *page)
{ {
......
...@@ -30,6 +30,7 @@ extern unsigned long phys_initrd_size; ...@@ -30,6 +30,7 @@ extern unsigned long phys_initrd_size;
* zero-initialized data and COW. * zero-initialized data and COW.
*/ */
struct page *empty_zero_page; struct page *empty_zero_page;
EXPORT_SYMBOL(empty_zero_page);
static void __init zone_sizes_init(void) static void __init zone_sizes_init(void)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment