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: Greentime Hu <greentime@andestech.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Greentime Hu 2018-04-19 15:45:45 +08:00
parent 03969d0b3a
commit e3f4624388
6 changed files with 32 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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)
fpn = (unsigned long *)fpp; fpn = (unsigned long *)fpp;
} }
} }
EXPORT_SYMBOL_GPL(save_stack_trace_tsk);

View File

@ -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)
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)
popm $r1, $r9 popm $r1, $r9
ret ret
ENDPROC(clear_page) ENDPROC(clear_page)
EXPORT_SYMBOL(clear_page)

View File

@ -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)
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)
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)
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)
{ {

View File

@ -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)
{ {