linux-stable/arch/riscv/mm
Alexandre Ghiti fe45ffa4c5
riscv: Move early fdt mapping creation in its own function
The code that handles the early fdt mapping is hard to read and does not
create the same mapping size depending on the kernel:

- for 64-bit, 2 PMD entries are used which amounts to a 4MB mapping
- for 32-bit, 2 PGDIR entries are used which amounts to a 8MB mapping

So keep using 2 PMD entries for 64-bit and use only one PGD entry for
32-bit needed to cover 4MB. Move that into a new function called
create_fdt_early_page_table which, using the same naming as
create_kernel_page_table.

Signed-off-by: Alexandre Ghiti <alex@ghiti.fr>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
2021-08-11 22:41:38 -07:00
..
Makefile riscv: Fixup patch_text panic in ftrace 2021-01-14 15:09:04 -08:00
cacheflush.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
context.c riscv: add ASID-based tlbflushing methods 2021-06-30 20:55:39 -07:00
extable.c riscv: abstract out CSR names for supervisor vs machine mode 2019-11-05 09:20:42 -08:00
fault.c riscv: Enable KFENCE for riscv64 2021-06-30 20:55:41 -07:00
hugetlbpage.c hugetlbfs: remove hugetlb_add_hstate() warning for existing hstate 2020-06-03 20:09:46 -07:00
init.c riscv: Move early fdt mapping creation in its own function 2021-08-11 22:41:38 -07:00
kasan_init.c riscv: Ensure BPF_JIT_REGION_START aligned with PMD size 2021-06-18 21:10:05 -07:00
pageattr.c RISC-V Patches for the 5.11 Merge Window, Part 1 2020-12-18 10:43:07 -08:00
physaddr.c riscv: Introduce structure that group all variables regarding kernel mapping 2021-07-05 18:04:00 -07:00
ptdump.c riscv: Fix PTDUMP output now BPF region moved back to module region 2021-07-06 15:21:27 -07:00
tlbflush.c riscv: add ASID-based tlbflushing methods 2021-06-30 20:55:39 -07:00