linux/arch/riscv
Atish Patra 2191b4f298
RISC-V: Move all address space definition macros to one place
We get the following compilation error if CONFIG_SPARSEMEM_VMEMMAP is set.

---------------------------------------------------------------
./arch/riscv/include/asm/pgtable-64.h: In function ‘pud_page’:
./include/asm-generic/memory_model.h:54:29: error: ‘vmemmap’ undeclared
(first use in this function); did you mean ‘mem_map’?
 #define __pfn_to_page(pfn) (vmemmap + (pfn))
                             ^~~~~~~
./include/asm-generic/memory_model.h:82:21: note: in expansion of
macro ‘__pfn_to_page’

 #define pfn_to_page __pfn_to_page
                     ^~~~~~~~~~~~~
./arch/riscv/include/asm/pgtable-64.h:70:9: note: in expansion of macro
‘pfn_to_page’
  return pfn_to_page(pud_val(pud) >> _PAGE_PFN_SHIFT);
---------------------------------------------------------------

Fix the compliation errors by moving all the address space definition
macros before including pgtable-64.h.

Fixes: 8ad8b72721 (riscv: Add KASAN support)

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
2020-03-26 19:26:11 -07:00
..
boot riscv: dts: Add GPIO reboot method to HiFive Unleashed DTS file 2020-03-05 12:27:10 -08:00
configs RISC-V: Only select essential drivers for SOC_VIRT config 2020-03-26 12:35:04 -07:00
include RISC-V: Move all address space definition macros to one place 2020-03-26 19:26:11 -07:00
kernel riscv: fix the IPI missing issue in nommu mode 2020-03-18 18:44:39 -07:00
lib riscv: uaccess should be used in nommu mode 2020-03-18 18:44:30 -07:00
mm riscv: Fix range looking for kernel image memblock 2020-03-04 15:11:03 -08:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2019-12-27 14:20:10 -08:00
Kbuild riscv: add arch/riscv/Kbuild 2019-08-30 17:34:00 -07:00
Kconfig riscv: uaccess should be used in nommu mode 2020-03-18 18:44:30 -07:00
Kconfig.debug RISC-V: Remove EARLY_PRINTK support 2018-12-17 10:23:46 -08:00
Kconfig.socs RISC-V: Only select essential drivers for SOC_VIRT config 2020-03-26 12:35:04 -07:00
Makefile riscv: Change code model of module to medany to improve data accessing 2020-03-03 10:27:46 -08:00