]> git.baikalelectronics.ru Git - kernel.git/commit
riscv: fix compile failure with EXPORT_SYMBOL() & !MMU
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Sun, 22 Dec 2019 09:26:04 +0000 (10:26 +0100)
committerPaul Walmsley <paul.walmsley@sifive.com>
Sat, 28 Dec 2019 05:44:36 +0000 (21:44 -0800)
commitd4317a9c82395ee626321d66bbdfa4041247c36c
tree535ad09cbfa0e4b9a9f4939bb170daf52d22c5a5
parent75e273687aee789166c077bbe05d67c0252abf3f
riscv: fix compile failure with EXPORT_SYMBOL() & !MMU

When support for !MMU was added, the declaration of
__asm_copy_to_user() & __asm_copy_from_user() were #ifdefed
out hence their EXPORT_SYMBOL() give an error message like:
  .../riscv_ksyms.c:13:15: error: '__asm_copy_to_user' undeclared here
  .../riscv_ksyms.c:14:15: error: '__asm_copy_from_user' undeclared here

Since these symbols are not defined with !MMU it's wrong to export them.
Same for __clear_user() (even though this one is also declared in
include/asm-generic/uaccess.h and thus doesn't give an error message).

Fix this by doing the EXPORT_SYMBOL() directly where these symbols
are defined: inside lib/uaccess.S itself.

Fixes: 3932ca301903 ("riscv: fix compile failure with EXPORT_SYMBOL() & !MMU")
Reported-by: kbuild test robot <lkp@intel.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
arch/riscv/kernel/riscv_ksyms.c
arch/riscv/lib/uaccess.S