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>
This commit is contained in:
David Abdurachmanov 2019-10-19 23:34:34 +03:00
parent 6a4020de8e
commit fd44d5ffe7
Signed by: davidlt
GPG Key ID: 8B7F1DA0E2C9FDBB
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,26 @@
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

View File

@ -588,6 +588,10 @@ Patch550: 0001-riscv-add-support-for-SECCOMP.patch
# https://github.com/sifive/riscv-linux/commits/dev/paulw/cpufreq-dt-aloe-v5.3-rc4
Patch552: 0002-SiFive-Unleashed-CPUFreq.patch
# RISC-V
# Not upstream, not posted
Patch553: 0001-riscv-make-kern_addr_valid-available-without-CONFIG_.patch
# END OF PATCH DEFINITIONS
%endif