Skip to content
Commit 90db7b22 authored by David Abdurachmanov's avatar David Abdurachmanov Committed by Paul Walmsley
Browse files

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: d95f1a54

 ("RISC-V: Implement sparsemem")
Signed-off-by: default avatarDavid Abdurachmanov <david.abdurachmanov@sifive.com>
Tested-by: default avatarDavid Abdurachmanov <david.abdurachmanov@sifive.com>
Reviewed-by: default avatarLogan Gunthorpe <logang@deltatee.com>
Signed-off-by: default avatarPaul Walmsley <paul.walmsley@sifive.com>
parent 7d194c21
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