]> git.baikalelectronics.ru Git - kernel.git/commit
riscv: fix fs/proc/kcore.c compilation with sparsemem enabled
authorDavid Abdurachmanov <david.abdurachmanov@gmail.com>
Tue, 22 Oct 2019 16:21:35 +0000 (19:21 +0300)
committerPaul Walmsley <paul.walmsley@sifive.com>
Wed, 23 Oct 2019 21:53:46 +0000 (14:53 -0700)
commit5b05a18a155b958cdbb5352dbff7fbc1f1189ebc
tree82d19461ad5c0371778a75f4c722cf8aac27a336
parentd55ec79322ce9b92dd17cc61a7dbc4dc812814a3
riscv: fix fs/proc/kcore.c compilation with sparsemem enabled

Failed to compile Fedora/RISCV kernel (5.4-rc3+) with sparsemem enabled:

fs/proc/kcore.c: In function 'read_kcore':
fs/proc/kcore.c:510:8: error: implicit declaration of function 'kern_addr_valid'; did you mean 'virt_addr_valid'? [-Werror=implicit-function-declaration]
  510 |    if (kern_addr_valid(start)) {
      |        ^~~~~~~~~~~~~~~
      |        virt_addr_valid

Looking at other architectures I don't see kern_addr_valid being guarded by
CONFIG_FLATMEM.

Fixes: 6926d79460ca ("RISC-V: Implement sparsemem")
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
Tested-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
arch/riscv/include/asm/pgtable.h