kernel/0001-riscv-make-kern_addr_valid-available-without-CONFIG_.patch
David Abdurachmanov fd44d5ffe7
Fix riscv compile error in fs/proc/kcore.c
BUILDSTDERR: fs/proc/kcore.c: In function 'read_kcore':
BUILDSTDERR: fs/proc/kcore.c:510:8: error: implicit declaration of function 'kern_addr_valid'; did you mean 'virt_addr_valid'? [-Werror=implicit-function-declaration]
BUILDSTDERR:   510 |    if (kern_addr_valid(start)) {
BUILDSTDERR:       |        ^~~~~~~~~~~~~~~
BUILDSTDERR:       |        virt_addr_valid

Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-10-19 23:34:34 +03:00

27 lines
878 B
Diff

From 634c24af79a94122e32554e49e5c08b6e3b8036b Mon Sep 17 00:00:00 2001
From: Fedora Kernel Team <kernel-team@fedoraproject.org>
Date: Sat, 19 Oct 2019 20:32:35 +0000
Subject: [PATCH] riscv: make kern_addr_valid available without CONFIG_FLATMEM
---
arch/riscv/include/asm/pgtable.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
index 7255f2d..644532c 100644
--- a/arch/riscv/include/asm/pgtable.h
+++ b/arch/riscv/include/asm/pgtable.h
@@ -428,9 +428,7 @@ static inline int ptep_clear_flush_young(struct vm_area_struct *vma,
#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
-#ifdef CONFIG_FLATMEM
#define kern_addr_valid(addr) (1) /* FIXME */
-#endif
extern void *dtb_early_va;
extern void setup_bootmem(void);
--
2.23.0