Skip to content

Commit 90db7b2

Browse files
davidltpaul-walmsley-sifive
authored andcommitted
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: d95f1a5 ("RISC-V: Implement sparsemem") Signed-off-by: David Abdurachmanov <[email protected]> Tested-by: David Abdurachmanov <[email protected]> Reviewed-by: Logan Gunthorpe <[email protected]> Signed-off-by: Paul Walmsley <[email protected]>
1 parent 7d194c2 commit 90db7b2

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

arch/riscv/include/asm/pgtable.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,9 +428,7 @@ static inline int ptep_clear_flush_young(struct vm_area_struct *vma,
428428
#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
429429
#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
430430

431-
#ifdef CONFIG_FLATMEM
432431
#define kern_addr_valid(addr) (1) /* FIXME */
433-
#endif
434432

435433
extern void *dtb_early_va;
436434
extern void setup_bootmem(void);

0 commit comments

Comments
 (0)