From fd44d5ffe7ce22e97c090c3f6924c7317c0f25ca Mon Sep 17 00:00:00 2001 From: David Abdurachmanov Date: Sat, 19 Oct 2019 23:34:34 +0300 Subject: [PATCH] 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 --- ...addr_valid-available-without-CONFIG_.patch | 26 +++++++++++++++++++ kernel.spec | 4 +++ 2 files changed, 30 insertions(+) create mode 100644 0001-riscv-make-kern_addr_valid-available-without-CONFIG_.patch diff --git a/0001-riscv-make-kern_addr_valid-available-without-CONFIG_.patch b/0001-riscv-make-kern_addr_valid-available-without-CONFIG_.patch new file mode 100644 index 000000000..d259544f6 --- /dev/null +++ b/0001-riscv-make-kern_addr_valid-available-without-CONFIG_.patch @@ -0,0 +1,26 @@ +From 634c24af79a94122e32554e49e5c08b6e3b8036b Mon Sep 17 00:00:00 2001 +From: Fedora Kernel Team +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 + diff --git a/kernel.spec b/kernel.spec index 990b59490..612c7420c 100644 --- a/kernel.spec +++ b/kernel.spec @@ -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